42_minishell/builtins/pwd.c

21 lines
1.0 KiB
C
Raw Normal View History

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