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 dandyn
4 hours ago
tcl by dandyn
4 hours ago
tcl by dandyn
5 hours ago
tcl by dandyn
2 days ago
tcl by dandyn
2 days ago
tcl by emiliano
13 days ago
tcl by dandyn
13 days ago
tcl by schelte
20 days ago
tcl by bohagan
23 days ago
tcl by emiliano
24 days ago
Submit
New paste
Documentation
From Jabber