> "Com MN PG P E B Consultant 3" 
> <[EMAIL PROTECTED]> wrote:
> > echo THIS DOES NOT WORK
> > foo=$(cat exp_test <<BAD | tr -d V= | grep '[0-9]*')
> > V=1234
> > abcd
> > BAD
> 
> 0. Since you passed a file name to cat, it will ignore stdin.
> 1. Since the here-document belongs to the command in $(), the
>    here-document must also be entirely inside $().  Move the closing )
>    after "BAD".
> 2. [0-9]* matches every line, since * matches 0 or more occurrences.

Thank you VERY much! I introduced stupidity #0 and #2, when I tried
to turn my real application into a "simple example". But #1 was the
explanation I was really looking for! I did not even know that a $(...)
is allowed to span several lines.

Ronald
-- 
Ronald Fischer (phone +49-89-63676431)
mailto:[EMAIL PROTECTED]


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to