943,807 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jul 21st, 2006
0

Re: Replacing text

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
chrchcol is offline Offline
22 posts
since Aug 2005
Jul 21st, 2006
0

Re: Replacing text

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.
Reputation Points: 10
Solved Threads: 17
Posting Whiz in Training
shanenin is offline Offline
217 posts
since May 2005
Jul 22nd, 2006
0

Re: Replacing text

That one did not error out at all. However the output from it was

/root

Chris
Reputation Points: 10
Solved Threads: 0
Newbie Poster
chrchcol is offline Offline
22 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: printing path and making it relative.
Next Thread in Shell Scripting Forum Timeline: i want to get output through shell script





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC