![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 |
| Search, replace string in file1 with string from (lookup table) file2? | gstuart | Shell Programming and Scripting | 2 | 04-11-2008 11:32 AM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 06:24 AM |
| How to replace all string instances found by find+grep | umen | Shell Programming and Scripting | 0 | 12-05-2007 11:52 PM |
| Search for string and display those NOT found | John Rihn | Shell Programming and Scripting | 17 | 05-22-2007 05:22 AM |
| String Search & Replace | IwishIknewC | UNIX for Dummies Questions & Answers | 1 | 03-25-2006 02:28 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Recursive Search and replace only when found string
Hello all ( again )
I will like to search and replace string in text file ok I can loop throw the files like : foreach f ( ` find . -name "*.[h|c]"`) .. but here I like to examine the file if in contain the desired string and so do the sed –e 's/blah/foo/g' thingy on it or there is better way ? ? you see I don’t want to rename every file and rename it back first I will like to test its content and getting true or false hope I made my self clear Thanks allot |
| Forum Sponsor | ||
|
|