Replacing text

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2005
Posts: 20
Reputation: chrchcol is an unknown quantity at this point 
Solved Threads: 0
chrchcol chrchcol is offline Offline
Newbie Poster

Re: Replacing text

 
0
  #11
Jul 21st, 2006
pwd | sed "s/\/home/\/httpd/\/vusers/\/*.fileburst.com/\/web_users/\/chris2/\/chris.fileburst.com/\/web_users/\/chris2"
This is what I tried and it did not work, can you show me the flaw?
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Solved Threads: 16
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: Replacing text

 
0
  #12
Jul 21st, 2006
If you use code tags your post would be a little easier to read. Try this
Shell Scripting Syntax (Toggle Plain Text)
  1. pwd | sed "s/\/home\/httpd\/vusers\/*.domain.com\/web_users\/chris2/\/chris.domain.com\/web_users\/chris2/g"

I am not sure, but the "*" might not wotrk with sed. let me know if this works
Last edited by shanenin; Jul 21st, 2006 at 11:34 pm.
In a perfect world exceptions would not be needed.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 20
Reputation: chrchcol is an unknown quantity at this point 
Solved Threads: 0
chrchcol chrchcol is offline Offline
Newbie Poster

Re: Replacing text

 
0
  #13
Jul 22nd, 2006
That one did not error out at all. However the output from it was

/root

Chris
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Shell Scripting Forum


Views: 5633 | Replies: 12
Thread Tools Search this Thread



Tag cloud for Shell Scripting
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC