bash:brackets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
bash:brackets [2021/01/09 13:57] – [Escaping of Parentheses] peter | bash:brackets [2021/01/09 13:59] (current) – [Rule of Thumb] peter | ||
---|---|---|---|
Line 208: | Line 208: | ||
===== Rule of Thumb ===== | ===== Rule of Thumb ===== | ||
- | As a rule of thumb, [[ is used for strings and files. | + | As a rule of thumb, |
If you want to compare numbers, use an ArithmeticExpression, | If you want to compare numbers, use an ArithmeticExpression, | ||
Line 218: | Line 218: | ||
</ | </ | ||
- | When should the new test command < | + | When should the new test command < |
- | For reasons explained in the theory section below, any problem with an operator used with < | + | * If portability/ |
+ | * If on the other hand the script requires BASH, Zsh, or KornShell, the new syntax is usually more flexible, but not necessarily backwards compatible. | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
bash/brackets.1610200650.txt.gz · Last modified: 2021/01/09 13:57 by peter