[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-user
Subject: [gentoo-user] Re: OT: global search and replace
From: Alexander Skwar <listen () alexander ! skwar ! name>
Date: 2004-09-10 4:23:45
Message-ID: 41412C51.7090800 () von ! digitalprojects ! com
[Download RAW message or body]
Billy Holmes wrote:
> Alexander W. Skwar wrote:
>
>
>>>> sed -i 's/oldhostname/newhostname/g' "${FILE}"
>>>
>>>perl makes this easier..
>>
>>In how far?
>
>
> it takes care of the backup files for you, perl's -i does't create
> backups unless you specify an extension like -i.bak
Okay, and how does that differ from sed? If you'd read the man page
of sed, you'd find:
-i[suffix], --in-place[=suffix]
edit files in place (makes backup if extension supplied)
No extension (==suffix), no backup.
> therefore, no need for a block of shell code to remove the tmp files.
> thus easier in this case means less work.
Yes. That block's redundant.
Alexander Skwar
--
"Love may fail, but courtesy will previal."
-- A Kurt Vonnegut fan
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
--
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