Upload files to "OS/bash"

This commit is contained in:
Aadit Agrawal 2025-01-17 10:47:07 +05:30
parent af4130f9be
commit 30bce06742

11
OS/bash/q1.sh Normal file
View File

@ -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