Skip to content

Instantly share code, notes, and snippets.

@psycalc
Created September 28, 2021 10:35
Show Gist options
  • Save psycalc/cde96281024fa37a1d1c6a4e241b26ba to your computer and use it in GitHub Desktop.
Save psycalc/cde96281024fa37a1d1c6a4e241b26ba to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$1" == "vasya" ]; then
echo "Privet $1"
elif [ "$1" == "jack" ]; then
echo "Hello $1"
else echo "Zdarova $1"
fi
x=""
while [ "$x" != "q" ]
do
read -p "Enter x:" x
echo "Starting CASE selection..."
case $x in
1) echo "This is one";;
[2-9]) echo "Two-Nine";;
"Petya") echo "this petya";;
*) echo "Parameter Unkown, sorry!";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment