On 03:50 05 Jan 2003, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
| Slick little script ...good show!
Hope you find it useful. Cheers,
--
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/
IE 5.0 introduces nothing but a bunch of DHTML extensions you'd never stoop
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 re
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:
Marco,
Using vi you can
vi file.txt -w scriptfile
and any commands you enter in the editor will automatically be recorded
and placed in the file "scriptfile". (Just enter your global
replacement command and exit.)
Now, on any file that you want to execute this script file against,
issu
Marco Shaw,
On Saturday January 04, 2003 12:24, Marco Shaw 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 exa
Just use vi and use the %s/foo/bar/g then save it unless you don't want
to do it interactively, then I'd use a tmp file, just as easy.
Scott
On Sat, 2003-01-04 at 10:24, Marco Shaw wrote:
> What I want:
> Take file.txt and *strip* out "foo" and replace with "bar", *but* I
> don't want to redirect
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