Newsgroups: comp.lang.awk
From: Manuel Collado <m.coll...@domain.invalid>
Date: Sat, 15 Sep 2012 20:52:14 +0200
Local: Sat, Sep 15 2012 2:52 pm
Subject: Re: windows scripting with gawk
El 15/09/2012 18:09, pop escribi :
> pop said the following on 9/15/2012 11:04 AM:
If string values must also been supported, the there is a tricky solution >> Manuel Collado said the following on 9/15/2012 9:56 AM: >>>> There is no unix/linux equivalent method to set an environment >>>> variable in >>>> windows as explained above. The only way I have been able to do it >>>> (within >>>> [g]awk) is as follows: >>>> 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}"
>> This only works for numerical values 0-255; other method will work for
>> regards;
> I stand corrected on the numerical values... apparently "exit number" works
based on command expansions in FOR lists: for /F %%k in ('awk "BEGIN {print \"alpha\"}"') do set x=%%k
The above works for a script in a file. At the interactive console just -- 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.
| ||||||||||||||