Skip to content

Instantly share code, notes, and snippets.

@daniellowtw
Created February 26, 2021 10:53
Show Gist options
  • Save daniellowtw/c1665b496808bc6f4fadbdc454892e67 to your computer and use it in GitHub Desktop.
Save daniellowtw/c1665b496808bc6f4fadbdc454892e67 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
doWork() {
# make modifications here
git br -d $i
}
for i in $(ls); do
echo $i
read -p "Delete [y/N]? " answer
case $answer in
[yY]*)
doWork "$i"
echo -e "\e[31m Processed\e[0m $i"
;;
*)
echo -e "\e[32m Moving on... \e[0m"
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment