On Wed, 30 Jan 2008 13:44:47 -0700, Bob Proulx wrote:
> Stefan Palme wrote:
>> don't know if this is the right newsgroup, but it's the only one I can
>> find with "bash" in its name :-)
>
> That newsgroup is gatewayed to the bug-bash mailing list.
>
>> I want to do something like this:
>>
>> r
Stefan Palme wrote:
> don't know if this is the right newsgroup, but it's the only one
> I can find with "bash" in its name :-)
That newsgroup is gatewayed to the bug-bash mailing list.
> I want to do something like this:
>
> result=""
> /usr/bin/output_generator | while read line; do
>
Thanks for your reply.
> It is not a bug in bash. it is just how it works.
I know, but did not find a gnu.bash.help newsgroup :$
> do this:
>
> result=""
> while read line; do
> extracteddata=`echo "$line" | sed -e 's/X/Y/'` result="$result
> $extracteddata"
> done < <(/usr/bin
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 "$
Hi,
don't know if this is the right newsgroup, but it's the only one
I can find with "bash" in its name :-)
I want to do something like this:
result=""
/usr/bin/output_generator | while read line; do
extracteddata=`echo "$line" | sed -e 's/X/Y/'`
result="$result $extracteddata"
done