Upload files to "OS/bash/Week3"

This commit is contained in:
Aadit Agrawal 2025-01-17 10:49:39 +05:30
parent 49b7d5d30c
commit e27e2c7837
5 changed files with 76 additions and 0 deletions

11
OS/bash/Week3/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