sanjay kumar via Bug reports for the GNU Bourne Again SHell
writes:
Somehow all the line breaks in your report were lost. As I reconstruct
it, you wrote:
> cat test.sh
#!/bin/bash
echo "argv[0] = ${0}"
echo "argv[1] = ${1}"
echo "argv[2] = ${2}"
echo "count = ${#}"
=
Bash is behaving correctly; this is not a bug in Bash. And this list is for
reporting bugs, not fixing user scripts, so rather than spoon-feed you an
explanation, I'm going to give you enough pointers to enable you to
discover it for yourself.
Start by reading what the manual says about reading co
> cat test.sh#!/bin/bashecho "argv[0] = ${0}"echo "argv[1] = ${1}"echo "argv[2]
> = ${2}"echo "count = ${#}"===> bash -c ./test.sh abc
> defargv[0] = ./test.shargv[1] =argv[2] =count = 0===> bash
> ./test.sh abc defargv[0] = ./test.shargv[1] = abcargv[2] = defco