Posted to tcl by Poor Yorick at Tue Dec 10 10:25:14 GMT 2019view raw

  1. #! /bin/env bash
  2.  
  3. params=( "$@" )
  4. f1 () {
  5. local -n var
  6. var="$1"
  7. set -- "${var[@]}"
  8. while [ $# -gt 0 ] ; do
  9. echo "$1"
  10. shift
  11. break
  12. done
  13. var="$@"
  14. }
  15.  
  16. f1 params
  17.