bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] in-place edit request


From: arnold
Subject: Re: [bug-gawk] in-place edit request
Date: Mon, 31 Dec 2012 05:48:54 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Hi Ed.

> Arnold - does the proposed solution allow the user to write:
>
>      gawk -X 'script' file
>
> where "X" is some appropriate letter and the result is to update "file"
> with the result of executing "script" on the original contents of "file"?
> 
> I just want to make sure we're talking about implementing something every
> bit as simple to use as the sed, perl, and ruby equivalents otherwise
> it's probably not worth bothering with.

It would be

        gawk -i inplace 'script' file

There is nothing stopping anyone from writing a one line wrapper:

        $ cat aip       # Awk In Place
        #! /bin/sh
        exec gawk -i inplace "$@"

Arnold



reply via email to

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