7 lines
108 B
Bash
7 lines
108 B
Bash
map() {
|
|
typeset command=$1
|
|
shift
|
|
for i do "$command" "$i"; done
|
|
}
|
|
set -A ary 1 2 3
|
|
map print "${ary[@]}"
|