Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!shelby!agate!ucbvax!VM.UOGUELPH.CA!SOFPJF From: SOFPJF@VM.UOGUELPH.CA (Peter Jaspers-Fayer) Newsgroups: comp.sys.sgi Subject: awk vs echo Message-ID: <9102111145.aa01900@VGR.BRL.MIL> Date: 11 Feb 91 16:23:04 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: Computing Services, University of Guelph, Ont. Can. N1G 2W1 Lines: 22 I guess that even after a year of trying, I do not understand the way the shell (csh) passes things to it's children, viz: This is an excerpt from a longer awk command, and I'm stuck: This works awk '{ print "'$user': " $0}' as does awk '{ print "'`hostname`': " $0}' But not awk '{ print "'`date`': " $0}' (Spaces(?) Colons(?)) Even tho echo '{ print "'`date`': " $0}' works OK, and if I CUT&PASTE the result of the echo into another awk '', something like: awk '{ print "Mon Feb 11 11:35:32 EST 1991: " $0}' IT WORKS! Why are the last and 2nd-last awks different? Anyone please? /PJ SofPJF@VM.UoGuelph.Ca -------------------------------------- How did a fool and his money get together in the first place? -Anon