The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-27-2005
gopskrish gopskrish is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 26
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