|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
||||
|
||||
|
one liner needed for searh and replace
Hi guys,
I need a quick oneliner - either perl or bash to search all files in the current directory for the expression "fred_flintstone" and replace it with "barny_rubble". I wrote a perl script to do this a few weeks ago, but it's at home on my laptop.. and I'm up to /here/ right now at work ! help would be much appreciated. thanks christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
|
#2
|
||||
|
||||
|
done
$ perl -pi -e 's/fred_flintstone/barny_rubble/' *
seems to do the job Christo ![]() it would be interesting, though, to see if this is doable in bash as a one liner from the command line ! |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > one liner needed for searh and replace |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|