![]() |
|
|
|
|
|||||||
| 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 |
| find and replace | javeed7 | Shell Programming and Scripting | 1 | 04-02-2008 06:00 AM |
| find and replace | mahabunta | UNIX for Dummies Questions & Answers | 7 | 09-21-2006 09:05 AM |
| find and replace | valhutch | UNIX for Dummies Questions & Answers | 4 | 07-29-2006 02:20 PM |
| find and replace | vikas_j@hotmail | UNIX for Dummies Questions & Answers | 3 | 02-25-2002 02:41 PM |
| Find & Replace | gagansharma | Shell Programming and Scripting | 3 | 11-27-2001 01:17 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
find replace
Hi
I am replacing some string occurances with empty string in all files under one directory using find ./ -name "*.dmp" | xargs perl -pi -e 's/\\N//g' | its taking too much time for replacing and redirecting to same file in the same directory. Similarly afterwards i am finding last character of each line.If last character is semicolon i am removing it.If last character is not semicolon i am appending next line to present line using sed -e :a -e '/;$/!N;s/\n//; ta' -e 's/;$//' But this is also taking too much time for the operation. I am doing above operation without looping. Can anyone have a look at it? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
does this directory contain a thousand *.dmp files?
|
|
#3
|
|||
|
|||
|
Yes it contains thousand.dmp files
|
|||
| Google The UNIX and Linux Forums |