Skip to content

Commit

Permalink
remove solution from shell > argument_check.md exercise (#10238)
Browse files Browse the repository at this point in the history
  • Loading branch information
harisheoran committed Feb 2, 2024
1 parent 4b3d7d0 commit d91a7e3
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions topics/shell/argument_check.md
Expand Up @@ -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. If it's the string "pizza" print "with pineapple?"
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
```
2. If it's not the string "pizza" print "I want pizza!"

0 comments on commit d91a7e3

Please sign in to comment.