diff options
author | Martijn Dekker <martijn@inlv.org> | 2016-01-10 23:17:48 +0100 |
---|---|---|
committer | Martijn Dekker <martijn@inlv.org> | 2016-01-10 23:17:48 +0100 |
commit | 2b24132f3cdaa01c3dc3dad22c6542dac52f7437 (patch) | |
tree | 51b355b40a9db0a2581a6b1a7fd7daaf2d16ad77 /drafts | |
parent | f3329f0a82cf7b4ef3fa8011f87fc8a3dafd753e (diff) |
Consistent use of [[ and (( instead of [
Another minor code cleanup. Within [[ ... ]] and (( ... )) (but not [ ... ]) there is a different shell parsing context in which field splitting (a.k.a. word splitting) and pathname expansion (a.k.a. filename globbing) don't apply, so consistently use '[[' (and '((' for arithmetics) instead of '[' and remove unnecessary quotes.
Since '[[ x == y]]' does 'case'-like glob pattern matching on 'y', the quotes to the right of '==' need to be kept for variables or glob characters, except if a glob pattern is wanted.
Diffstat (limited to 'drafts')
0 files changed, 0 insertions, 0 deletions