Skip to content

Instantly share code, notes, and snippets.

@rothwerx
Created May 16, 2013 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rothwerx/5595947 to your computer and use it in GitHub Desktop.
Save rothwerx/5595947 to your computer and use it in GitHub Desktop.
Bash: Keep or Delete?
#keep or delete?
function kod()
{
ls -l $@
echo "Keep (k) or Delete (d)?"
read answer
if [ $answer == "k" ]; then
echo "Keeping. As you wish."
elif [ $answer == "d" ]; then
echo "DELETING $@"
rm -rf $@
else
echo "You need to push either k or d. This isn't hard."
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment