bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: How can I export a variable from awk to a shell script


From: John Cowan
Subject: Re: FW: How can I export a variable from awk to a shell script
Date: Thu, 15 Jun 2006 14:24:39 -0400
User-agent: Mutt/1.3.28i

address@hidden scripsit:

> Is it possible to generate a variable into an awk command et export
> it to a shell script ? I assume that I use nawk but maybe it's the
> same in gawk.

It is inherently impossible for a program such as awk that is being
run by a shell to affect the environment of that shell.  So attempts to
change the DIR variable from within awk will not work.  There is nothing
you can do to get around this, except to run a subshell from within your
awk program, which is probably not what you want.

-- 
"But I am the real Strider, fortunately,"       John Cowan
he said, looking down at them with his face     address@hidden
softened by a sudden smile.  "I am Aragorn son  http://www.ccil.org/~cowan
of Arathorn, and if by life or death I can
save you, I will."  --LotR Book I Chapter 10




reply via email to

[Prev in Thread] Current Thread [Next in Thread]