Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.