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 egavilan
16 hours ago
tcl by bch
6 days ago
tcl by Bradipo
6 days ago
tcl by aspect
6 days ago
tcl by Bradipo
6 days ago
tcl by Bradipo
6 days ago
tcl by Bradipo
6 days ago
lilypond by Bradipo
8 days ago
tcl by cgm
18 days ago
tcl by dandyn
27 days ago
Submit
New paste
Documentation
From Jabber