![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fast search and replace in all files | dbsurf | Shell Programming and Scripting | 21 | 02-01-2008 12:42 AM |
| Multiple search in multiple files | maxvirrozeito | Shell Programming and Scripting | 2 | 12-13-2007 10:32 AM |
| multiple input search and replace script | tungaw2004 | UNIX for Dummies Questions & Answers | 3 | 04-29-2007 04:59 AM |
| Multiple search and replace | tungaw2004 | UNIX for Dummies Questions & Answers | 1 | 03-21-2007 09:03 PM |
| cp without maintaining the soucre directory tree hierarchy | 435 Gavea | UNIX for Dummies Questions & Answers | 2 | 03-03-2006 09:47 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need to search and replace in multiple files in directory hierarchy
Hello all
I need to search and replace in multiple files that are in directory hierarchy Im using the : f PHP Code:
with empty space . how can I write one liner that does this ? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
Code:
find . -name "*.dsp" | xargs -i sed 's/Test.lib//g' {}
|
|
#3
|
||||
|
||||
|
Hi, shamrock.
Did you mean: Code:
find . -name "*.dsp" | xargs sed -i 's/Test.lib//g' Otherwise, the sed operation will not be written "in place" and the sed output for all files will go to STDOUT ... cheers, drl Last edited by drl; 12-24-2007 at 04:17 AM. |
|
#4
|
|||
|
|||
|
If I may ask another question in this thread, what is I like to search string inside close archive like tar or jar
How should my find command look like ? |
|||
| Google The UNIX and Linux Forums |