Sample Header Ad - 728x90

Why should one never use the `-a` or `-o` operators with `[`?

12 votes
1 answer
961 views
Stéphane Chazelas wrote: > a few rules like > > - always quote variables > - never use the -a or -o operator (use several [ commands and the && and || shell operators) > > Make [ reliable with POSIX shells. Why "never use the -a or -o operator"? How can I do "use several [ commands and the && and || shell operators)"?
Asked by Tim (106422 rep)
Mar 19, 2016, 07:33 AM
Last activity: May 11, 2024, 11:03 AM