From 30bce06742dd80ed5442661e347204127ae8448b Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Fri, 17 Jan 2025 10:47:07 +0530 Subject: [PATCH] Upload files to "OS/bash" --- OS/bash/q1.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 OS/bash/q1.sh 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