Re: Executable awk script
- From: Ted Davis <tdavis@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Oct 2005 15:20:06 -0500
On Thu, 20 Oct 2005 07:33:39 -0700, corey lawson
<corey.lawson@xxxxxxxxxxxxx> wrote:
>Bill Seivert wrote:
>
>>
>>
>> mickey wrote:
>>
>>> Is there a way to turn a awk script into an executable so that you do
>>> not need to have awk installed to run it?
>>>
>>> Thanks,
>>>
>>> -M
>>
>>
>> #!/path/to/awk -f
>> BEGIN {
>> ...
>> }
>> etc.
>>
>> But awk still needs to be installed.
>>
>> Bill Seivert
>>
>
>...and the #! magic string doesn't work on Windows (but assigning .awk
>file extension to gawk.exe more or less ends up with the same result).
There are contexts in which it does, notably Apache CGI scripts.
>
>But who in their right mind would use gawk on Windows? Well, it makes
>analyzing and filtering text files (i.e., database table/view dumps)
>WAYYY easier and faster than linking to them via ODBC...
I use it for many CGI scripts because it is quite useful, and more
approachable than Perl. And if crafted carefully, are very portable
between XP and Linux (the trick is to make the script file have Unix
\n instead of Windows \r\n line endings).
--
T.E.D. (tdavis@xxxxxxxxxxxxxxxxxxxx)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.
.
- Follow-Ups:
- Re: Executable awk script
- From: Tim Menzies
- Re: Executable awk script
- From: corey lawson
- Re: Executable awk script
- References:
- Executable awk script
- From: mickey
- Re: Executable awk script
- From: Bill Seivert
- Re: Executable awk script
- From: corey lawson
- Executable awk script
- Prev by Date: Re: Executable awk script
- Next by Date: Re: Executable awk script
- Previous by thread: Re: Executable awk script
- Next by thread: Re: Executable awk script
- Index(es):
Relevant Pages
|