-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpwd.c
25 lines (22 loc) · 1.11 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
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pwd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aouchaad <aouchaad@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/19 20:04:23 by esekouni #+# #+# */
/* Updated: 2023/06/23 15:53:16 by aouchaad ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int ft_pwd(t_environment_path *envp)
{
t_environment_path *env;
char current_dir[PATH_MAX];
env = envp;
getcwd(current_dir, sizeof(current_dir));
ft_putstr_fd(current_dir, 1);
write (1, "\n", 1);
return (0);
}