Just for anyone else reading your 'solution', you missed out a dollar on the first line; minor typo I realise but should be:
Code: Select all
sub_func() { foo; echo "$@"; }
wiak
EDIT: @misko: Just noticed you sent same about $ missed out (which didn't anyway actually effect the operation of the program aside from the output text), sorry.