On Sunday, July 29, 2012 03:23:29 PM Jason Vas Dias wrote:
echo $(count_args 1 2 3\ 4)
I should also have mentioned that I couldn't reproduce this case. You should
be getting 4 here in your example, not 3. I have the same Bash version. Are
you sure you were echoing `${#v[@]} ' and not `${#@}',
On 7/28/12 12:38 PM, Maarten Billemont wrote:
Trapping on EXIT is a really convenient way of cleaning up after yourself
when your script ends.
I agree that the EXIT trap should work on {} asynchronous subshells, and I
will make sure that the next version of bash does this.
However, the two
On Sun, 29 Jul 2012, Jason Vas Dias wrote:
Good day Chet, list -
I'm concerned about the difference in output of these functions with
the example input
given on the '$' prefixed line below (with 4.2.29(2)-release
(x86_64-unknown-linux-gnu)):
function count_args {v=($@);
Thanks Dan -
The plot thickens - Yes, you're right, I had $IFS mistakenly set to ':' in the
shell in which I ran 'count_args' . Without this IFS setting, I get
a count of 4:
$ env -i PATH=/bin:/usr/bin HOME=${HOME} /bin/bash --norc
$ count_args 1 2 3\ 4
4
$ IFS=: count_args 1 2 3\ 4
3
Jason Vas Dias jason.vas.d...@gmail.com writes:
Thanks Dan -
The plot thickens - Yes, you're right, I had $IFS mistakenly set to ':' in
the
shell in which I ran 'count_args' . Without this IFS setting, I get
a count of 4:
$ env -i PATH=/bin:/usr/bin HOME=${HOME} /bin/bash --norc
$
Thanks Andreas -
I guess your answer mostly explains my issue - except for one thing:
And shouldn't '3\ 4' be a single string in any case, regardless of IFS ?
It is. But if field splitting is applied to it it will be split in two
words when $IFS contains a space.
This was really the point
Hello all,
The header file sys/param.h is not checked for by configure and is not
provided by the VMS environment.
I have worked around this issue by having the VMS specific build script
create an empty substitute file.
The HP VMS Engineering team has indicated a willingness to add the