I was writing an if statement which checked if a file is readable and exists by doing the following:
if [[ -r "$upFN" && -f "$upFN" ]]; then
....
fi
Then I thought, surly you can make this smaller, something maybe like this:
if [[ -r -f "$upFN" ]]; then
....
fi
But this doesn't work, it returns errors:
./ftp.sh: line 72: syntax error in conditional expression
./ftp.sh: line 72: syntax error near `"$upFN"'
./ftp.sh: line 72: `if [[ -r -f "$upFN" ]]; then'