shell-whiz-toolkit/shell_scripts/find_if_file_exists.sh
2024-10-15 09:59:09 +09:00

15 lines
No EOL
174 B
Bash
Executable file

#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage - $0 file-name"
exit 1
fi
if [ -f $1 ]
then
echo "$1 file exist"
else
echo "Sorry, $1 file does not exist"
fi