New answers tagged test
3
votes
Accepted
Why does the test command apparently choke on a for loop variable?
I suspect the problem comes from ls’s use of colours in its output. Since you’re parsing ls’s output, if ls outputs colours, the corresponding escape codes will end up in the values given to f, and ...
- 393k
Top 50 recent answers are included
Related Tags
test × 355bash × 188
shell-script × 114
shell × 103
variable × 26
linux × 20
string × 18
files × 17
scripting × 13
quoting × 13
regular-expression × 12
wildcards × 12
zsh × 11
ksh × 11
directory × 9
numeric-data × 8
permissions × 6
posix × 6
command-line × 5
command-substitution × 5
variable-substitution × 5
exit-status × 5
arithmetic × 5
ubuntu × 4
grep × 4