#include "minishell.h" int size_tab(char **split) { int i; i = 0; while (*split++) i++; return (i); } void print_tab(char **array) { int i; i = 0; while (array[i]) { printf("%i: [%s]\n", i, array[i]); i++; } } void cmd_execution(char *cmd, t_all *c) { const char *filename; char **argv; char **envp; // (void)cmd; filename = ft_strtrim(cmd, " "); printf("[%s]\n", filename); // filename = "/bin/ls"; argv = ft_split(filename, ' '); envp = c->envp; execve(filename, argv, envp); } void pipes_hugo(char *input, t_all *c) { char **split; int nbr_pipes; int i; split = ft_split(input, '|'); split[0] += 5; // pour sauter la premiere entree qui est "pipe" nbr_pipes = size_tab(split); //printf("%i\n", nbr_pipes); //print_tab(split); i = 0; cmd_execution(split[i], c); }