bash programming
Contents:
- CheetSheet
- GNU's Manual
- Arithmetic
- Arrays
- Base and Extensions
- Escape Sequences
[Top][Home]
CheetSheet
https://devhints.io/bash
[Top][Home]
[Top][Home]
GNU's Manual
Bash Reference Manual:
https://www.gnu.org/software/bash/manual/html_node/index.html
[Top][Home]
Arithmetic
https://ryanstutorials.net/bash-scripting-tutorial/bash-arithmetic.php#google_vignette
- let expression - Make a variable equal to an expression.
- expr expression - Print out the result of the expression.
- $(( expression )) - Return the result of the expression. eg a=$(( 4 + 5 )) or ((i++))
- ${#var} - Return the length of the variable var.
[Top][Home]
Arrays
https://www.gnu.org/software/bash/manual/html_node/Arrays.html
https://wiki.bash-hackers.org/syntax/arrays
[Top][Home]
Base and Extensions
[Top][Home]
Escape Sequences
Sequence Meaning
- \a Alert (bell).
- \c Suppress trailing newline.
- \e Escape.
- \f Form feed.
- \n Newline.
- \t Horizontal tab.
- \v Vertical tab.
- \\ Backslash.
- \0NNN The eight-bit character whose value is the octal value NNN (zero to three octal digits).
- \NNN The eight-bit character whose value is the octal value NNN (one to three octal digits).
- \xHH The eight-bit character whose value is the hexadecimal value (one or two hexadecimal digits).
Glenn Lyons VK4PK
glenn@LyonsComputer.com.au
Ver:gnl2021 - pre published v0.9