[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-user
Subject: Re: [gentoo-user] OT: global search and replace
From: Alex <suburbancore () gmail ! com>
Date: 2004-09-09 6:33:26
Message-ID: 179d1620409082333e9d31fd () mail ! gmail ! com
[Download RAW message or body]
i 'm too much of a vi user :)
i keep one generic script like so :
#!/bin/bash
for file in `find . -name "*.php"`;
do vi -s replace-script $file;
done;
and one task-specific vi one with the actual substitution
(replace-script in the script above)
which contains the commands:
:1,$s/oldhostname/newhostname/g
:wq
On Thu, 09 Sep 2004 11:42:17 +1000, Adam Carter <adam@jaftan.com.au> wrote:
> I need to run a script over all the docs in a htdocs folder (and sub
> folders) to do a s/oldhostname/newhostname/g - my shell-fu is not up to
> the task. How can i acheive this?
>
> TIA,
> Adam
>
> --
> gentoo-user@gentoo.org mailing list
>
>
--
---
We come in peace....We leave in pieces
---
--
gentoo-user@gentoo.org mailing list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic