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 Stu
6 days ago
tcl by rhobart
19 days ago
tcl by stevel
23 days ago
tcl by dandyn
31 days ago
tcl by dandyn
31 days ago
tcl by dandyn
31 days ago
tcl by dandyn
33 days ago
tcl by dandyn
34 days ago
tcl by emiliano
44 days ago
tcl by dandyn
44 days ago
Submit
New paste
Documentation
From Jabber