![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | 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 !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem in awk command | viveksnv | Shell Programming and Scripting | 3 | 03-03-2008 12:59 AM |
| problem with tr command | ravi raj kumar | UNIX for Advanced & Expert Users | 2 | 07-02-2007 03:41 AM |
| problem with dd command or maybe AFS problem | Anta | Shell Programming and Scripting | 0 | 08-25-2006 07:10 AM |
| ls command problem | buckhtr77 | SUN Solaris | 2 | 12-06-2005 12:16 PM |
| Sed command problem | tomapam | Shell Programming and Scripting | 1 | 12-20-2002 04:02 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this 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 |
| Forum Sponsor | ||
|
|
|
|||
|
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" |