Pattern: Possible misuse of shell file redirection
Issue: -
A word that looks like a redirection in simple shell commands causes it to be interpreted as a redirection.
Example of incorrect code:
[ 1 >2 ] || [ 3>'aaa bb' ] # Simple example of problematic code
Example of correct code:
[ 1 -gt 2 ] || [ 3 \> 'aaa bb' ] # arithmetical, lexicographical
When it's among a continuous list of redirections at the end of a simple test
command, it's more likely that
the user really meant to do a redirection. Or any other case that you mean to do that.