Array Elements with Spaces

2007-11-10 Thread Michael Potter
Group, I have having a problem with spaces in individual elements of an array. The space causes a single element to be seen as multiple elements. Here is a sample run: - [EMAIL PROTECTED]:~/bin> ./arraywithspace.sh 3.1.17(1)-release got 6 parm

Re: Array Elements with Spaces

2007-11-10 Thread Michael Potter
exhaustive test because this solution will work for me. -- potter On Nov 10, 2007 12:27 PM, Andreas Schwab <[EMAIL PROTECTED]> wrote: > "Michael Potter" <[EMAIL PROTECTED]> writes: > > > countparms ${Arguments[*]} > > Use "[EMAIL PROTECTED]" instead

Re: read output of process into a variable

2008-01-30 Thread Michael Potter
It is not a bug in bash. it is just how it works. the while loop creates a subshell and changes to the variables are not visable outside of the subshell. if you put the while loop first, then it will not create the subshell. do this: result="" while read line; do extracteddata=`echo "$

errexit does not exit script in subshells

2008-01-31 Thread Michael Potter
Bash Bunch, Not surprisingly, bash does not exit the script when an error is detected in a subshell. I am hopeful that someone has a solution to this (other than: be careful to not use subshells). Here is the test run: --- ./subshellnofail.sh BEGIN ERROR: ./subshellnofail.sh 10

SOLUTION: errexit does not exit script in subshells

2008-01-31 Thread Michael Potter
ot really care for this solution. I hope someone will comment with a graceful solution. -- Michael Potter On Jan 31, 2008 11:43 AM, Michael Potter <[EMAIL PROTECTED]> wrote: > Bash Bunch, > > Not surprisingly, bash does not exit the script when an error is detected > in a subs

Re: errexit does not exit script in subshells

2008-02-01 Thread Michael Potter
ON". Hopefully someone will point out a more graceful solution. -- potter On Feb 1, 2008 1:56 PM, Linda Walsh <[EMAIL PROTECTED]> wrote: > > > Michael Potter wrote: > > Bash Bunch, > > > > Not surprisingly, bash does not exit the script when an error is detected in

broken pipe

2008-02-13 Thread Michael Potter
find in my real script. I just used that here so anyone could reproduce the problem. -- Michael Potter