Problem scenario
An "if" statement in Bash is throwing an error message "No such file or directory." What do you do?
Possible solution #1
Replace the parentheses around the arithmetical comparison with double parentheses. Instead of this:
if ( $numlines < 5); then
Use this:
if (( $numlines < 5)); then
Possible solution #2
Replace the "[]" with "(())".
Instead of this:
if [ $numlines < 5]; then
Use this:
if (( $numlines < 5)); then