Skip to content

Instantly share code, notes, and snippets.

@stallemanden
Last active January 29, 2016 13:41
Show Gist options
  • Save stallemanden/f89fe94077954f1dda89 to your computer and use it in GitHub Desktop.
Save stallemanden/f89fe94077954f1dda89 to your computer and use it in GitHub Desktop.
BashUligeTal
#!/bin/bash
echo -n "Tal mellem 0 og 20: "
read NUM1;
if [ $(($NUM1%2)) -eq 0 ];
then
ulige=0;
else
ulige=1;
fi
case $ulige in
0) echo "Lige tal";;
1) echo "Ulige tal";;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment