![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| serach file using awk | mohan705 | Shell Programming and Scripting | 3 | 08-28-2007 11:04 AM |
| Replace path in a file with dot | njoshi | Shell Programming and Scripting | 3 | 04-23-2007 09:37 PM |
| Replace a Directory path with another in a file | venkatajay_18 | Shell Programming and Scripting | 3 | 10-17-2006 03:52 PM |
| vi - replacing a relative path with absolute path in a file | Yinzer955i | UNIX for Dummies Questions & Answers | 2 | 09-07-2006 11:47 AM |
| text serach in unknown file | ted | UNIX for Advanced & Expert Users | 11 | 10-23-2003 03:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
serach and replace file name in the path in a remote xml file
hi every one ,
here is my problem !! i have to run my script from an account and update the result in a xml file located on a different account. i use existing ssh keys to do it remotely for example the tags looks like this <PropertyValueList DeploymentName="Generic" NodeName="Generic" AppServerName="Generic"> <PropertyValue PropertyName="ProductCatalogBinaryFile"> <Value>/app/tsa/tsausr1_wb154/tsa/oms/ete3oms/OMSTSA_v06.00_1/OMS/pcdump/PcDump_06Nov_MAX_FT_80008.bin</Value> i need to serach the PcDump_06Nov_MAX_FT_80008.bin file and update with the new filename, am having with me say for example PcDump_10Nov_MAX_FT_80008.bin but the catch is , the absolute path mentioned above changes from one account to another , and also the file names the file name pattern is same in every account like this PcDump_xxxxx_MAX_FT_xxxxxx.bin Last edited by kiranreddy1215; 11-12-2007 at 09:30 AM.. |
|
||||
|
Something like
sed 's|/PcDump_[0-9][0-9][A-Z][a-z][a-z]_MAX_FT_[[0-9][0-9][0-9][0-9][0-9].bin|/PcDump_10Nov_MAX_FT_80008.bin|g' <input xml> Wouldn't it be easier to cp the PCDump*.txt file to a standard input file name, and code for that name permanently? |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|