-
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: adel-cor <adel-cor@student.42urduli> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/05 13:24:54 by adel-cor #+# #+# */
/* Updated: 2022/04/12 10:40:27 by adel-cor ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int built_pwd(void)
{
char str[PATH_MAX];
if (getcwd(str, sizeof(str)) == NULL)
return (1);
printf("%s\n", str);
return (0);
}