Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Is there a easy way to find and replay a match
Heesob Park
5/29/2008 2:19:00 AM
Hi,
Cheyne Li wrote:
> Hi,there
>
> If I have file and has a line is "aaa=100", and need to replace it as
> "aaa=4".
> Is there a way to do it without iterating each line and find the match,
> then replace it? Thank in advance
ruby -i -pe'gsub(/aaa=100/,"aaa=4")' somefile
Regards,
Park Heesob
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Is there a easy way to find and replay a match
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password