-
Notifications
You must be signed in to change notification settings - Fork 0
/
pwd.c
23 lines (20 loc) · 1.03 KB
/
pwd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pwd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hchorfi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/02/16 17:16:51 by hchorfi #+# #+# */
/* Updated: 2021/05/04 14:30:35 by hchorfi ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int ft_pwd(void)
{
char cwd[PATH_MAX];
getcwd(cwd, PATH_MAX);
ft_putstr_fd(cwd, 1);
write(1, "\n", 1);
return (g_data.ret = 0);
}