-
Notifications
You must be signed in to change notification settings - Fork 0
Part 1.2 : Syntax errors
Vladou73 edited this page Jun 11, 2022
·
1 revision
- starting with redirection : no error
> file.txt
,< file.txt
,<< file.txt
,>> file.txt
: in bash, no error - starting with pipe generates error :
| echo coucou
-
| >
,| <
,| >>
,| <<
: no error
- redirection followed by pipe => error
-
< |
,> |
,>> |
,<< |
: error - 2 pipes qui s'enchainent : error
| |
msg :bash: syntax error near unexpected token
|'`
- redirection without any string afterwards => error
-
echo <
,echo >
,echo >>
,echo <<
: error -
echo |
: same error for pipe msg :bash: syntax error near unexpected token
newline'`
- redirection following another redirection => error
- msg : depends on the 2nd redirection token
-
echo < >>
,echo > >>
,echo >> >>
,echo << >>
: all have same error msg : bash: syntax error near unexpected token `>>'