hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Need help with sed replace syntax
Reply

Forum Jump

Need help with sed replace syntax

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-19-2011, 10:55 AM
HAClusterTech HAClusterTech is offline
sed -i -e 's#iron#man#g'
 
Join Date: Aug 2004
Posts: 604

Need help with sed replace syntax


Hi guys,

Can anyone help me with this problem? I need to replace the following 4 lines of code with nothing in its place that were inserted into an htaccess file and want to do it with sed.

Options -MultiViews
ErrorDocument 404 //cgi-bin/57268.php

Options -MultiViews
ErrorDocument 404 //cgi-bin/13574.php

Can anyone show me the syntax?

Thanks

__________________
ExaCloud Systems Inc. - New Jersey Colocation & Cloud/VPS Servers

ExaNetwork Inc. - Cisco & Brocade Network Management Services



Sponsored Links
  #2  
Old 08-19-2011, 11:08 AM
wartungsfenster wartungsfenster is online now
Web Hosting Master
 
Join Date: Mar 2010
Location: Germany
Posts: 612
Quote:
Originally Posted by Salsero View Post
Hi guys,

Can anyone help me with this problem? I need to replace the following 4 lines of code with nothing in its place that were inserted into an htaccess file and want to do it with sed.

Options -MultiViews
ErrorDocument 404 //cgi-bin/57268.php

Options -MultiViews
ErrorDocument 404 //cgi-bin/13574.php

Can anyone show me the syntax?

Thanks
I never had to replace multiple lines, but this looks like a howto for human beings instead of regex fanbois:

http://austinmatzko.com/2008/04/26/s...h-and-replace/

You only want it to remove "Options -MultiViews" and the next line *if* the next line is pointing to either of these 404 urls, right?

Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
sed command replace everything betwwen comments S4Host Hosting Security and Technology 7 03-15-2010 12:12 PM
Replace or not Replace 4 years old server. Geo2008 Dedicated Server 8 09-13-2008 02:13 AM
HELP: sed insert Tomcatf14 Programming Discussion 1 08-03-2006 08:21 AM
SED help Tomcatf14 Programming Discussion 6 03-24-2006 10:01 AM
Shell {SED} stevebarnes Hosting Software and Control Panels 0 05-11-2001 05:38 PM

Related posts from TheWhir.com
Title Type Date Posted
GoDaddy to Deliver Spree Commerce-Based Platform for Online Stores Web Hosting News 2014-02-26 11:50:56
Nginx to be Included in Upcoming Ubuntu Release Web Hosting News 2014-01-08 15:17:12
Web Host Hostway Replaces Legacy Webmail with Open-Xchange Web Hosting News 2013-02-01 11:17:40
VDI Provider Pano Logic Goes Out of Business, Leaves Customers with Questions Web Hosting News 2012-11-01 14:30:59
DataChambers Expands into Triangle with Purchase of Raleigh Data Center Web Hosting News 2012-09-26 15:14:25


Tags
sed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?