-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.c
30 lines (27 loc) · 1.12 KB
/
env.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* env.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akhalid <akhalid@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/17 02:10:39 by aelkhalo #+# #+# */
/* Updated: 2022/03/03 01:33:27 by akhalid ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
void ft_env(char **args)
{
t_env *tmp;
if (n_args(args) == 1)
{
tmp = g_all.env;
while (tmp != NULL)
{
if (tmp->value)
printf("%s=%s\n", tmp->key, tmp->value);
tmp = tmp->next;
}
}
g_all.exit_status = 0;
}