Upload files to "OS/bash"
This commit is contained in:
parent
af4130f9be
commit
30bce06742
11
OS/bash/q1.sh
Normal file
11
OS/bash/q1.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user