awk/csh parsing error?

Fred Sena sena at infinet.UUCP
Wed Jan 16 07:02:03 AEST 1991


(I would have emailed this, but I don't understand how to mail to
internet addresses using bang paths.  Could someone tell me how?)

In article <1991Jan15.154832.1804 at netnews.whoi.edu> rich at boreas.whoi.edu writes:
>
>rich(2)% `awk ' /\.LP/ {printf "aabb" }' <test`
>aabb: Command not found.

[...]

>In the second case, adding a space to the first printf string ("aa ") causes
>a parsing error. Finally, if we repeat all of the the above cases prefixing
>the commands with echo(1V), awk works perfectly every time:
>
>rich(8)% echo `awk ' /\.LP/ {printf "aabb" }' <test`
>aabb
>
>
>Any ideas?

In the first case, the C-shell is attempting to execute the output of your
awk command.  It's as if you typed 'aabb' at the csh prompt, which of course
is not a valid command.

In the second case, you are passing the output of the 'awk' command as an
argument to the 'echo' command, which is OK.

	--fred





-- 
--------------------------------------------------
Frederick J. Sena                sena at infinet.UUCP
Memotec Datacom, Inc.  N. Andover, MA



More information about the Comp.unix.questions mailing list