![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk - replace number of string length from search and replace for a serialized array | otrotipo | Shell Programming and Scripting | 1 | 07-10-2009 12:04 PM |
| Problem with sed (search/replace) | tipi | Shell Programming and Scripting | 9 | 08-26-2008 05:22 PM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| vi search & replace ... having '/' in string - problem. | videsh77 | UNIX for Dummies Questions & Answers | 6 | 06-20-2007 01:49 PM |
| Search and replace sed or tr | bridgeje | Shell Programming and Scripting | 6 | 10-28-2003 07:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
The following code loops through every file with an error extension and then loops through all XML files in that directory and replaces the target character @ with / . The problem I have is that if there is more than one occurance of @ in each individual file it doesn't replace it. Any ideas??? P: for %%f in (*.error) do ( for %%g in (%%~nf\*.xml) do ( IF findstr /L /M /C:@ %%g > nul && "C:\Program Files\GnuWin32\bin\"sed -i -B s/@/\// %%g && rename %%f %%~nf.finished && echo Changes made to %%g >> C:\AnnuityErrors.log ) ) C: |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|