Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
bash [2016/02/19 13:17] steve |
bash [2020/09/08 23:18] steve |
||
---|---|---|---|
Line 27: | Line 27: | ||
* [[http://redsymbol.net/articles/unofficial-bash-strict-mode/|Use the Unofficial Bash Strict Mode (Unless You Looove Debugging)]] - strict mode to help find bugs | * [[http://redsymbol.net/articles/unofficial-bash-strict-mode/|Use the Unofficial Bash Strict Mode (Unless You Looove Debugging)]] - strict mode to help find bugs | ||
* [[http://ascii-table.com/ansi-escape-sequences-vt-100.php|ANSI Escape Sequences]] | * [[http://ascii-table.com/ansi-escape-sequences-vt-100.php|ANSI Escape Sequences]] | ||
+ | * [[https://mywiki.wooledge.org/BashPitfalls|Bash Pitfalls]] | ||
== String Operators == | == String Operators == | ||
Line 230: | Line 231: | ||
* Start of Line: Ctrl A | * Start of Line: Ctrl A | ||
* End of Line: Ctrl E | * End of Line: Ctrl E | ||
+ | |||
+ | == Check Input == | ||
+ | |||
+ | Check to see if input is an integer: | ||
+ | |||
+ | <code> | ||
+ | if [[ $1 == ?(-)+([0-9]) ]]; then echo "$1 is an integer"; fi | ||
+ | </code> |