Unpack list into named variables
tomocafe opened this issue · comments
bb_unpack LISTVAR var1 var2 ...
would set var1=${LISTVAR[0]}
, etc.
Stop assigning once the list is empty.
Similar, bb_rename ITEM1 ITEM2 ... var1 var2 ...
to set var1=ITEM1
, etc.
Useful so you can do this in a function: bb_rename "$@" foo bar