1 2 3 4 5 6 7
#!/bin/sh fmt=*.${1:-"txt"} for file in $(echo "$fmt"); do [ -e "$file" ] && rm "$file" || exit 1 done