1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash unset IFS set -euf DEST="$HOME/.local/bin" EXECUTABLES=(crit) for EXECUTABLE in "${EXECUTABLES[@]}"; do F="$DEST/$EXECUTABLE" # Idempotent if [ -f "$F" ]; then rm -f "$F" fi done echo "removed executables: (${EXECUTABLES[*]}) from: $DEST"