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



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 06-27-2005
rahul123_libra rahul123_libra is offline
Registered User
  
 

Join Date: May 2005
Posts: 46
Quote:
Originally Posted by gopskrish
noofdays=TransactionParams







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

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"
  #3 (permalink)  
Old 06-27-2005
gopskrish gopskrish is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 26
Rahul,


Perfect. Thanks a lot for your valuable inputs.

cheers,
gops
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0