hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Basic sed Question
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Basic sed Question

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-10-2008, 09:08 PM
SI-Chris SI-Chris is offline
Web Hosting Master
 
Join Date: Nov 2000
Location: USA
Posts: 1,269

Basic sed Question


Hi, I'm writing an upgrade script and want to use sed to change this:
Code:
<div id="header">
to this:
Code:
<div id="header" onclick="location.href='<?php echo get_settings('home'); ?>';" style="cursor: pointer;">
I'm familiar with the basic sed s/before/after/ command, but I've tried various methods of quoting and escaping characters in the above string and I just can't seem to get it to work. How can I do this?

Reply With Quote


Sponsored Links
  #2  
Old 04-10-2008, 10:10 PM
Lightwave Lightwave is offline
Web Hosting Master
 
Join Date: Apr 2003
Location: San Jose, CA.
Posts: 1,616
Code:
sed "s/<div id=\"header\">/<div id=header onclick=\"location.href='<?php echo get_settings('home'); ?>'\"; \"style=\"cursor: pointer;\">/"

__________________
Daved @ Lightwave Networking, LLC.
AS1426 https:/www.lightwave.net
Primary Bandwidth: EGIHosting (NLayer, Hurricane Electric, Global Crossing, Bandcon)
Xen PV VPS Hosting

Reply With Quote
  #3  
Old 04-10-2008, 10:54 PM
SI-Chris SI-Chris is offline
Web Hosting Master
 
Join Date: Nov 2000
Location: USA
Posts: 1,269
Ugh... that's so easy... I swear I tried every combination of delimiters and quotes I could think of... thanks a lot.

Reply With Quote
Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
The Value of Your Intellectual Property Blog 2013-05-06 17:43:13
Joomla Hosting Study Shows Speed, Uptime Top Selling Points of a Web Host Web Hosting News 2012-11-07 15:06:36
Rackspace Blog Looks at Easy Outsourcing for App Development Blog 2012-03-05 19:07:48
Selling Your Hosting Company #5 - Basic Structure and Credibility Blog 2011-12-09 17:39:20
Blackberry the UnCloud Blog 2011-10-14 15:28:54


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?