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 $
This shell script also works for finding a file in a directory:
echo "enter file" read -r a if [ -s /home/trainee02/"$a" ] then echo "yes. file is there." else echo "sorry. file is not there." fi