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 sebres
17 hours ago
tcl by iobates
17 days ago
tcl by iobates
17 days ago
tcl by iobates
17 days ago
tcl by FLORENTIS
21 days ago
tcl by Florentis
21 days ago
tcl by schelte
27 days ago
tcl by iobates
27 days ago
tcl by cgm
28 days ago
tcl by iobates
32 days ago
Submit
New paste
Documentation
From Jabber