remove solution from shell > argument_check.md exercise (#10238)

This commit is contained in:
Harish 2024-02-02 18:59:09 +05:30 committed by GitHub
parent 4b3d7d0460
commit d91a7e36cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,18 +6,4 @@ Note: assume the script is executed with an argument
1. Write a script that will check if a given argument is the string "pizza" 1. Write a script that will check if a given argument is the string "pizza"
1. If it's the string "pizza" print "with pineapple?" 1. If it's the string "pizza" print "with pineapple?"
2. If it's not the string "pizza" print "I want pizza!" 2. If it's not the string "pizza" print "I want pizza!"
### Solution
```
/usr/bin/env bash
arg_value=${1:-default}
if [ $arg_value = "pizza" ]; then
echo "with pineapple?"
else
echo "I want pizza!"
fi
```