summaryrefslogtreecommitdiff
path: root/bin/map
blob: ec514adeb46fb51d526b1c804d8849a302c10b3f (plain)
1
2
3
4
5
6
7
8
9
10
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