Skip to content

Commit d91a7e3

Browse files
authored
remove solution from shell > argument_check.md exercise (bregman-arie#10238)
1 parent 4b3d7d0 commit d91a7e3

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

topics/shell/argument_check.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,4 @@ Note: assume the script is executed with an argument
66

77
1. Write a script that will check if a given argument is the string "pizza"
88
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-
```
9+
2. If it's not the string "pizza" print "I want pizza!"

0 commit comments

Comments
 (0)