We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b3d7d0 commit d91a7e3Copy full SHA for d91a7e3
topics/shell/argument_check.md
@@ -6,18 +6,4 @@ Note: assume the script is executed with an argument
6
7
1. Write a script that will check if a given argument is the string "pizza"
8
1. If it's the string "pizza" print "with pineapple?"
9
- 2. If it's not the string "pizza" print "I want pizza!"
10
-
11
-### Solution
12
13
-```
14
-/usr/bin/env bash
15
16
-arg_value=${1:-default}
17
18
-if [ $arg_value = "pizza" ]; then
19
- echo "with pineapple?"
20
-else
21
- echo "I want pizza!"
22
-fi
23
+ 2. If it's not the string "pizza" print "I want pizza!"
0 commit comments