execute ok, il manque les heredocs

This commit is contained in:
hugogogo
2021-10-30 15:34:45 +02:00
parent 118e2e5bef
commit 698dcbe1ed
2 changed files with 26 additions and 6 deletions

17
fille.txt Executable file
View File

@@ -0,0 +1,17 @@
total 1376
drwxrwxr-x 2 simplonco simplonco 4096 oct. 30 15:32 builds
-rw-rw-r-- 1 simplonco simplonco 0 oct. 28 21:00 cat
-rw-rw-r-- 1 simplonco simplonco 125 oct. 28 21:00 echo
-rwxrwxr-x 1 simplonco simplonco 150 oct. 28 21:03 file.txt
-rwx------ 1 simplonco simplonco 0 oct. 30 15:33 fille.txt
drwxrwxr-x 2 simplonco simplonco 4096 oct. 28 21:10 headers
drwxrwxr-x 8 simplonco simplonco 4096 oct. 23 20:48 libft
-rw-rw-r-- 1 simplonco simplonco 1412 oct. 29 12:32 Makefile
-rwxrwxr-x 1 simplonco simplonco 72256 oct. 30 15:32 minishell
-rw-rw-r-- 1 simplonco simplonco 1273353 oct. 7 21:29 minishell.en.subject.pdf
-rw-rw-r-- 1 simplonco simplonco 3365 oct. 27 14:47 parsing.txt
-rw-rw-r-- 1 simplonco simplonco 15216 oct. 28 21:00 README.md
drwxrwxr-x 2 simplonco simplonco 4096 oct. 28 21:00 ressources
drwxrwxr-x 4 simplonco simplonco 4096 oct. 30 15:32 srcs
drwxrwxr-x 2 simplonco simplonco 4096 oct. 27 14:47 tests
-rw-rw-r-- 1 simplonco simplonco 58 oct. 13 17:38 valgrind_readline.supp

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
/* Updated: 2021/10/30 14:37:31 by hulamy ### ########.fr */
/* Updated: 2021/10/30 15:32:49 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -77,14 +77,17 @@ void shell_loop(t_all *c)
// builtin_echo(ft_lstsize((t_list *)c->token_list) + 1, tokens_list_to_argv(c->token_list), c);
// else
// {
c->cmd_arr = parsing(c->token_list, c->envp);
if (c->cmd_arr == NULL)
ft_putstr_fd("Syntax KO:\n-----------\n", 1);
else
ft_putstr_fd("Syntax OK:\n-----------\n", 1);
ft_putstr_fd("TOKENS LIST :\n-----------\n", 1);
ft_lstprint((t_list *)c->token_list, 1);
// execute_cmd(c->envp, c->cmd_arr);
// else
// ft_putstr_fd("Syntax OK:\n-----------\n", 1);
// ft_putstr_fd("TOKENS LIST :\n-----------\n", 1);
// ft_lstprint((t_list *)c->token_list, 1);
execute_cmd(c->envp, c->cmd_arr);
ft_lstclear((t_list **)&c->token_list, free);
// }
}