POSIX Shell
Quoting
echo 'abc def'
abc\\ def
"abc def" # can add more stuffs in
Some special characters that needs to be avoided
- " double quote and ' single quote can be used to express string
- \ escape character, | pipeline
-
- [ → for regex
- & → running in background
-
→ comment, $variable
- = → assignment
- SPC, NEWLINE, and TAB → separate arguments
- ~ → home directory
- ! → command line substitution
- !! → execute the previous command (bash-specific)
Non-special characters
letters, digits,
+ - @ % ^ _ / , { } ]
Tokens
- | pipe , & runs in background