-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathms_utils2.c
More file actions
41 lines (36 loc) · 1.18 KB
/
ms_utils2.c
File metadata and controls
41 lines (36 loc) · 1.18 KB
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
32
33
34
35
36
37
38
39
40
41
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ms_utils2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jheo <jheo@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/26 22:06:40 by jheo #+# #+# */
/* Updated: 2024/12/26 22:07:29 by jheo ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int echo_cmd_check(t_plst *l)
{
int i;
i = 1;
while (l->pipe_split[1][i])
{
if (l->pipe_split[1][i] != 'n')
return (0);
i++;
}
return (1);
}
int find_char_index(char *str, char c)
{
int i;
i = 0;
while (str[i])
{
if (str[i] == c)
return (i);
i++;
}
return (0);
}