I\'ve used the following script to see if a file exists:
#!/bin/bash FILE=$1 if [ -f $FILE ]; then echo \"File $FILE exists.\" else echo \"File $
If you want to use test instead of [], then you can use ! to get the negation:
test
[]
!
if ! test "$FILE"; then echo "does not exist" fi