On Fri, Nov 28, 2014 at 1:07 PM, William Park wrote:
> Hi all,
>
> I just noticed that BASH_ARGV contains commandline arguments in reverse.
>
That's because it's a stack. According the bash manual: "The final
parameter of the last subroutine call is at the top of the stack; the first
parameter o
Hi all,
I just noticed that BASH_ARGV contains commandline arguments in reverse.
$ cat > x.sh
#!/bin/sh
declare -p BASH_ARGV
^D
$ sh x.sh 1 2 3 4 5
declare -a BASH_ARGV='([0]="5" [1]="4" [2]="3" [3]="2" [4]="1")'
--
William