-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.c
31 lines (28 loc) · 1.13 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
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* env.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: emohamed <emohamed@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/09 17:33:44 by emohamed #+# #+# */
/* Updated: 2023/09/30 21:32:20 by emohamed ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
void env_cmd(t_vars *vars)
{
int i;
i = 0;
while (i < vars->env_number)
{
if (vars->env[i].is_equal)
{
printf("%s", vars->env[i].key);
printf("=");
printf("%s\n", vars->env[i].value);
}
i++;
}
g_exit_status = 0;
}