-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_is_redirection.c
19 lines (17 loc) · 1.06 KB
/
ft_is_redirection.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_redirection.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abenamar <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/09 18:34:21 by abenamar #+# #+# */
/* Updated: 2023/09/15 10:35:58 by abenamar ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
uint8_t ft_is_redirection(char *cmd)
{
return (!ft_strncmp(cmd, "<<", 3) || !ft_strncmp(cmd, "<", 2)
|| !ft_strncmp(cmd, ">>", 3) || !ft_strncmp(cmd, ">", 2));
}