/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* pwd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/17 16:09:11 by erey-bet #+# #+# */ /* Updated: 2023/02/17 16:53:36 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); } int main(int argc, char *argv[], char **env) { pwd(init_env(env), 1); return (0); }