![]() |
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 for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem in awk command | viveksnv | Shell Programming and Scripting | 3 | 03-03-2008 04:59 AM |
| problem with tr command | ravi raj kumar | UNIX for Advanced & Expert Users | 2 | 07-02-2007 06:41 AM |
| problem with dd command or maybe AFS problem | Anta | Shell Programming and Scripting | 0 | 08-25-2006 10:10 AM |
| ls command problem | buckhtr77 | SUN Solaris | 2 | 12-06-2005 04:16 PM |
| Sed command problem | tomapam | Shell Programming and Scripting | 1 | 12-20-2002 08:02 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Problem while using Sed command
I want to write the output of From_Date_Parm and To_Date_Parm to the target file. I want to write a script by passing the filename.
In my case the file is TransactionParams I tried it through command line. noofdays=TransactionParams sed "s/From_Date_Parm.*$/From_Date_Parm=${now}/g" ./"$noofdays">./"$noofdays"\1\" When i do this it is reading TransactionParams and writing it into TransactionParams1 file But when i issue the next statement sed "s/To_Date_Parm.*$/To_Date_Parm=${nows}/g" ./"$noofdays"\1\>/data01/et2/et2/CTI_London/IAM/metadata/"$noofdays" it is giving following error message Can't open ./TransactionParams1>/data01/et2/et2/CTI_London/IAM/metadata/TransactionParams Let me know where the problem is. cheers, gops |
|
||||
|
Quote:
why another \ after 1 use this :- sed "To_date_Parm.*$/To_Date_Parm=${now}/g" ./"$noofdays"\1 > /data01//et2/et2/CTI_London/IAM/metadata/"$noofdays" |
|
||||
|
Rahul,
Perfect. Thanks a lot for your valuable inputs. cheers, gops |
| Sponsored Links | ||
|
|