builtin cmd error message - Y-in-Y/inyang GitHub Wiki

'Error message in bash'


1. simple command (환경변수 관련 x)

1. 명령어가 잘못된 경우

bash-3.2$ lo
bash: lo: command not found

bash-3.2$ echi
bash: echi: command not found

shell name: command: command not found

2. 명령어는 맞는데 argument가 잘못인 경우

bash-3.2$ cd asv
bash: cd: asv: No such file or directory

shell name: command: argument: No such file or directory

3-1. redirection 위치를 주지 않은 경우

bash-3.2$ hi <
bash: syntax error near unexpected token `newline'

bash-3.2$ hi >
bash: syntax error near unexpected token `newline'

bash-3.2$ hi >>
bash: syntax error near unexpected token `newline'

bash-3.2$ hi <<
bash: syntax error near unexpected token `newline'

shell name: syntax error near unexpected token 'newline'

3-2. redirection 위치가 잘못된 경우

bash-3.2$ hi < ei
bash: ei: No such file or directory

shell name: argument: No such file or directory

3-3. redirection 자체가 잘못된 경우

bash-3.2$ hi ><
bash: syntax error near unexpected token `<'

bash-3.2$ hi > <
bash: syntax error near unexpected token `<'

bash-3.2$ echo hi > <
bash: syntax error near unexpected token `<'

bash-3.2$ export < | >
bash: syntax error near unexpected token `|'

bash-3.2$ export > | >
bash: syntax error near unexpected token `|'

bash-3.2$ export >< | >
bash: syntax error near unexpected token `<'

bash-3.2$ export >? | >
bash: syntax error near unexpected token `newline'

bash-3.2$ ><
bash: syntax error near unexpected token `<'

bash-3.2$ > <
bash: syntax error near unexpected token `<'

bash-3.2$ <>
bash: syntax error near unexpected token `newline'

bash-3.2$ < >
bash: syntax error near unexpected token `>'

shell name: syntax error near unexpected token '뭔지모르겠음'


2. env (환경변수)

1-1. 명령어는 맞는데 argument가 잘못인 경우 (env)

bash-3.2$ env inyang
env: inyang: No such file or directory

env: argument: No such file or directory

1-2. 명령어는 맞는데 argument가 잘못인 경우 (export)

bash-3.2$ export -
bash: export: `-': not a valid identifier

shell name: export: 'argument': not a valid identifier

⚠️ **GitHub.com Fallback** ⚠️