42_minishell/builtins/pwd.c
Etienne Rey-bethbeder 5175073708 SBEUB SBEUB ARABE
2023-02-17 17:46:12 +01:00

21 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pwd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/17 16:09:11 by erey-bet #+# #+# */
/* Updated: 2023/02/17 17:08:00 by erey-bet ### ########.fr */
/* */
/* ************************************************************************** */
#include "../minishell.h"
int pwd(t_list **env, int fd)
{
ft_putstr_fd(get_value_by_key("PWD", env), fd);
write(fd, "\n", 1);
return (0);
}