TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:10162] awk syntax help needed



On Tue, Nov 16, 1999 at 02:50:39PM -0800, Carl Wilhelm Soderstrom wrote:
> >	As it is, I think you're missing "'s around the argument to the
> >system command.  I'm guessing that your command should look like this:
> >system("cp /from/this/dir/" + $1 + ".ext /home/here/")
>         I thought I had tried that; but with single quotes. <shrug>
>         turns out the command I wanted was:
> system("cp /from/this/dir/"$1".ext /home/here/")

	It wouldn't work with single quotes.  awk is not like the shell,
or perl in that regard.  awk string constants bear a much greater
syntactic resemblence to C string constants.

Have fun (if at all possible),
-- 
Its name is Public Opinion.  It is held in reverence. It settles everything.
Some think it is the voice of God.  Loyalty to petrified opinion never yet
broke a chain or freed a human soul.     ---Mark Twain
-- Eric Hopper (hopper@omnifarious.mn.org
                http://ehopper-host105.dsl.visi.com/~hopper) --

PGP signature