summaryrefslogtreecommitdiff
path: root/rushs/tinyprintf/glob_remove_shell
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/tinyprintf/glob_remove_shell')
-rwxr-xr-xrushs/tinyprintf/glob_remove_shell/glob_remove_shell.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/rushs/tinyprintf/glob_remove_shell/glob_remove_shell.sh b/rushs/tinyprintf/glob_remove_shell/glob_remove_shell.sh
new file mode 100755
index 0000000..c2e7ff7
--- /dev/null
+++ b/rushs/tinyprintf/glob_remove_shell/glob_remove_shell.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+fmt=*.${1:-"txt"}
+
+for file in $(echo "$fmt"); do
+ [ -e "$file" ] && rm "$file" || exit 1
+done