Xref: utzoo comp.unix.shell:1255 comp.unix.questions:28066 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!infinet!sena From: sena@infinet.UUCP (Fred Sena) Newsgroups: comp.unix.shell,comp.unix.questions Subject: Re: awk/csh parsing error? Message-ID: <2760@infinet.UUCP> Date: 15 Jan 91 20:02:03 GMT References: <1991Jan15.154832.1804@netnews.whoi.edu> Reply-To: sena@infinet.UUCP (Fred Sena) Organization: Infinet, Inc. North Andover, MA Lines: 37 (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@netnews.whoi.edu> rich@boreas.whoi.edu writes: > >rich(2)% `awk ' /\.LP/ {printf "aabb" }' 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" }' 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@infinet.UUCP Memotec Datacom, Inc. N. Andover, MA