Xref: utzoo comp.unix.shell:1257 comp.unix.questions:28078 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!hansm From: hansm@cs.kun.nl (Hans Mulder) Newsgroups: comp.unix.shell,comp.unix.questions Subject: Re: awk/csh parsing error? Summary: It's a bug in csh(1) Message-ID: <2639@wn1.sci.kun.nl> Date: 16 Jan 91 13:52:18 GMT References: <1991Jan15.154832.1804@netnews.whoi.edu> Sender: root@sci.kun.nl Followup-To: comp.unix.shell Organization: University of Nijmegen, The Netherlands Lines: 36 In article <1991Jan15.154832.1804@netnews.whoi.edu> rich@boreas.whoi.edu writes: >I seem to have run across a rather strange bug (feature?) while using >awk(1) and csh(1) on a Sparcstation with SunOS 4.1. Close, but no cigar. You ran across one of the many bugs in csh(1); awk(1) has nothing to do with it. The man page for csh(1) mentions (under BUGS): "Although robust enough for general use, adventures into the esoteric periphery of the C shell may reveal unexpected quirks." This "esoteric periphery" is rather large and the quirks are many. In this case, the problem is that if a command begins with a `...`, your frienly C shell decides that this `...` must produce exactly one word, the command name, and not any arguments. For example: example% `echo ls` bar foo example% ls `echo foo bar` bar foo example% `echo ls foo bar` `echo ls foo bar`: Ambiguous. If you want to do complicated things, use the Bourne shell or a derivative (Korn shell, Bourne Again SHell, whatever..) example$ `echo ls` bar foo example$ ls `echo foo bar` bar foo example$ `echo ls foo bar` bar foo Have a nice day, Hans Mulder hansm@cs.kun.nl