bash - modify an array by name
Posted to
tcl
by Poor Yorick at Tue Dec 10 10:25:14 GMT 2019
view raw
#! /bin/env bash
params=( "$@" )
f1 () {
local -n var
var="
$1
"
set
-- "
${var[@]}
"
while
[ $# -gt 0 ] ; do
echo "
$1
"
shift
break
done
var="$@"
}
f1 params
Recent Posts
tcl by cgm
19 hours ago
tcl by egavilan
6 days ago
tcl by smlckz
7 days ago
tcl by Guest86
12 days ago
tcl by mookie
13 days ago
tcl by greycat
18 days ago
tcl by mookie
26 days ago
tcl by mookie
26 days ago
tcl by mookie
32 days ago
tcl by mookie
34 days ago
Submit
New paste
Documentation
From Jabber