Skip to content

Instantly share code, notes, and snippets.

@pupca
Created December 2, 2010 09:15
Show Gist options
  • Save pupca/725021 to your computer and use it in GitHub Desktop.
Save pupca/725021 to your computer and use it in GitHub Desktop.
#!/bin/bash
function bad {
echo "Spatne heslo!"
exit 1
}
echo -n "Zadej heslo: "
read HESLO
SPRAVNE=`echo ledvinka | sed 's/^.\?...\(i.k\)/qed\1/g' | tr neaq cros`
if [ "$HESLO" != "$SPRAVNE" ]; then
bad
fi
echo "Spravne heslo!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment