summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorDavid Wührer <def@raspberrypi>2019-10-13 13:25:14 +0200
committerDavid Wührer <def@raspberrypi>2019-10-13 13:25:14 +0200
commite60829f7b9c61dc870173a8dd8f2f85c17517ec4 (patch)
treee99f252f307b3a4e31df5ff45cf5daf6bccaf9f6 /map
Initial commit
Diffstat (limited to 'map')
-rwxr-xr-xmap11
1 files changed, 11 insertions, 0 deletions
diff --git a/map b/map
new file mode 100755
index 0000000..ec514ad
--- /dev/null
+++ b/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