Stuff
public text v1 · immutable#!/bin/bash
append() {
eval "${1}=\"\$${1} ${2}\""
eval "${1}_=\"\$${1}_ ${3}\""
}
# build lists
append ls1 "file0" "0"
append ls1 "file1" "1"
append ls1 "file2 file3 file4" "2 3"
append ls2 "fileA" "0"
#append ls2 '{ ch#!!! as#&%$(&% }' "1 2" # <-- fails
echo "ls1:"
echo "${ls1}"
echo "${ls1_}"
echo "--"
echo "ls2:"
echo "${ls2}"
echo "${ls2_}"
exit