From 96b1188222209e3f8e1cf36577a71aaafe9e51e4 Mon Sep 17 00:00:00 2001 From: Liana Date: Sun, 14 Dec 2025 20:22:29 +0000 Subject: [PATCH] Add if/else ex. --- script.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/script.sh b/script.sh index cc8f447..7b6c465 100755 --- a/script.sh +++ b/script.sh @@ -1,12 +1,16 @@ #!/bin/bash - -if [ $# -eq 0 ]; then - echo "Usage: ./script.sh " - exit 1 +if [ "$name" == "Liana" ]; then + echo "Hello Liana!" + exit 0 +elif [ "$name" == "Admin" ]; then + echo "Hello Admin! You have full access." + exit 0 +else + echo "Hello $name!" + exit 0 fi -echo "Hello, all of you: $@"