42_minishell/pwd.c
2023-02-17 16:56:02 +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 16:55:42 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);
}