diff --git a/OS/bash/q1.sh b/OS/bash/q1.sh new file mode 100644 index 0000000..e9c36c0 --- /dev/null +++ b/OS/bash/q1.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Enter the name of item to be checked" +read name +if [ -f $name ]; then +echo "File $name exists" +elif [ -d $name ]; then +echo "Directory $name exists" +else +echo "Neither file or directory" +fi