summaryrefslogtreecommitdiff
path: root/bin/map
diff options
context:
space:
mode:
Diffstat (limited to 'bin/map')
-rwxr-xr-xbin/map11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/map b/bin/map
new file mode 100755
index 0000000..ec514ad
--- /dev/null
+++ b/bin/map
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+fn=$1
+if [[ "$fn" = *\$1* ]]
+then f(){ eval "$fn";}
+else f(){ eval "$fn" "$1";}
+fi
+shift
+for x in "$@"
+do f "$x"
+done