Cameron,

Slick little script ...good show!  

Regards, Mike Klinke



On Sunday 05 January 2003 02:24, Cameron Simpson wrote:
> On 13:24 04 Jan 2003, Marco Shaw <[EMAIL PROTECTED]> wrote:
> | What I want:
> | Take file.txt and *strip* out "foo" and replace with "bar", *but* I
> | don't want to redirect to a tmp file or anything:  I would like one
> | command.
> |
> | Perl:
> | 1. perl -pi -e 's/foo/bar/g' file.txt
> |
> | SED, for example:
> | 1. sed 's/foo/bar/g' file.txt > file.txt.tmp
> | 2. mv file.txt.tmp file.txt
> |
> | So perl does what I want to, but I'd prefer to stay with awk, sed,
> | or whatever GNU utils, if possible.
>
> Then you want "bsed":
>
>       http://www.zip.com.au/~cs/scripts/bsed
>
> thus:
>
>       bsed 's/foo/bar/g' file.txt
>
> Bsed is a shell wrapper for sed. I use it VERY heavily - it's
> remarkably useful to me.
 



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to