help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] What is the usage of BASH_ARGV


From: Peng Yu
Subject: [Help-bash] What is the usage of BASH_ARGV
Date: Sun, 14 Aug 2016 12:22:13 -0500

Hi, It is not quite clear what is the usage of BASH_ARGV according to
bash manual.

For example, I can not see how BASH_ARGV is useful (at least it does
not affect "$@"). Does anybody know the real usage of BASH_ARGV?

~$ cat main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:

declare -p BASH_ARGV
BASH_ARGV=(a b c)
echo "$@"
~$ ./main.sh
declare -a BASH_ARGV='()'

~/linux/test/bash/man/variable/BASH_ARGV/set$ ./main.sh

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]