|
|
Subject:
Linux search and replace from command line
Category: Computers > Software Asked by: davert3-ga List Price: $15.00 |
Posted:
08 Aug 2006 13:52 PDT
Expires: 07 Sep 2006 13:52 PDT Question ID: 753943 |
I need a Linux command line to search and replace for a string of text - I have gawk but can't figure it out - it's complicated by the fact that I have to replace slashes: would like to search for .com// and replace with .com/ in file sitemap.xml -- help? |
|
Subject:
Re: Linux search and replace from command line
Answered By: tisme-ga on 08 Aug 2006 16:01 PDT Rated: |
Hello davert3-ga, Try the following: sed 's/\.com\/\//\.com\//' file Let me know if this works for you. tisme-ga | |
|
davert3-ga
rated this answer:
Perfect the first time, thanks! |
|
Subject:
Re: Linux search and replace from command line
From: bozo99-ga on 08 Aug 2006 16:27 PDT |
perl -pi -e 's/(\.com\/)\//\1/' sitemap.xml |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |