Newsgroups: comp.lang.awk
From: Luuk <l...@invalid.lan>
Date: Sat, 15 Sep 2012 17:19:20 +0200
Local: Sat, Sep 15 2012 11:19 am
Subject: Re: windows scripting with gawk
On 15-09-2012 16:56, Manuel Collado wrote:
> El 15/09/2012 0:53, pop escribi :
Why on 'Windows or later'?
>> Ed Morton said the following on 9/14/2012 1:35 PM: >>> Serious_Developer <ehabaziz2...@gmail.com> wrote: >>>> I must recall that thread because I did not find other group who could
>>> Ignoring the Windows/batch stuff it sounds like you're trying to change
>>> Look (in UNIX, no idea what the Windows equivalent is):
>>> $ x=7; awk 'BEGIN{ ENVIRON["x"]=8; print ENVIRON["x"] }'; echo "$x"
>>> If you want to change the value of a variable in your environment as a
>>> $ x=7; x=$(awk 'BEGIN{ ENVIRON["x"]=8; print ENVIRON["x"] }'); echo "$x"
>>> or generate a script to set the value and execute that script, e.g. with
>>> $ x=7; eval $(awk 'BEGIN{ ENVIRON["x"]=8; print "x="ENVIRON["x"] }');
>>> Regards,
>>> Ed.
>>> Posted using www.webuse.net
>> There is no unix/linux equivalent method to set an environment
>> set x=7
>> Note that "call" is used if in a batch file and further batch statements
>> HTH
> On Windows XP and later:
> awk "BEGIN {exit 8}"
The same works on *nix ;) #!/bin/bash
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||