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
Dual monitor for Intel 82915G & ATI Rage 128 card on FC6, Dell Optiplex Gx520 TsanChung UNIX Desktop for Dummies Questions & Answers 0 01-09-2009 12:59 PM
Ok I'm a Newb, Please Help Seeto UNIX for Dummies Questions & Answers 3 01-29-2006 07:06 AM
*nix newb needs books Shifty UNIX for Dummies Questions & Answers 3 01-31-2005 04:59 PM
help for a newb h3x UNIX for Dummies Questions & Answers 5 02-22-2004 08:05 PM
100% newb - please help Rawdawg UNIX for Dummies Questions & Answers 6 10-11-2003 11:22 AM

 
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 06-08-2009
GoneShootin GoneShootin is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 5
SED Newb - Range Rage!

Hi all

First time poster long time lurker. I've been trying to get my head around SED but I think my beginner status is starting to prove too great a hindrence. I have nearly 100 CSS files that I need to modify in such a way that


Code:
label, b, p .text{
some style stuff
}

would become


Code:
b ,p .text{
some style stuff
}

label {custom style stuff}

label can appear above in the following ways


Code:
label ,...


Code:
label, ....


Code:
, label...


Code:
,label...

What I was trying to do was operate the the different flavours of 'label', and then find the next closing tag '}'. I'm testing the finding of 'label' with


Code:
sed 's/,label//g;s/, label//g;;s/label,//g;s/label ,//' test.css


Code:
test.css

body{

    color: #000000;
    font-family: Verdana, Arial, Helvetica, Sans-Serif;
    font-size: 10px;
    margin: 0px;
    padding: 0px;
        background:white;
        /*background-image: url(images/background.gif);*/
}

label ,b, p, .text  
{
    color: #000000;
    font-family: Verdana, Arial, Helvetica, Sans-Serif;
    font-size: 10px;
}

label,b, p, .text  
{
    color: #000000;
    font-family: Verdana, Arial, Helvetica, Sans-Serif;
    font-size: 10px;
}

b, p, label .text  
{
    color: #000000;
    font-family: Verdana, Arial, Helvetica, Sans-Serif;
    font-size: 10px;
}

b, p,label .text  
{
    color: #000000;
    font-family: Verdana, Arial, Helvetica, Sans-Serif;
    font-size: 10px;
}

If anyone could give me some direction I'd really appreciate it.
 

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 06:50 AM.


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