[HPADM] RE: sed help

From: BAKHSHESH Kazem (BAKHSHEK@ESSILOR.fr)
Date: Fri Feb 24 2006 - 10:33:41 EST


Hi,

I dont know as well sed but awk can do it.
Lets see

KEY=WE
LINE="There is a ligne which contient so meny $KEY and others word which to
be remove"

echo $LINE | awk -F "$KEY" '{print $1" '$KEY'"}'
 

-----Message d'origine-----
De : hpux-admin-owner@DutchWorks.nl [mailto:hpux-admin-owner@DutchWorks.nl]
De la part de Quinn, Bryan
Envoyé : vendredi 24 février 2006 16:19
À : hpux-admin@dutchworks.nl
Objet : [HPADM] sed help

Hello Admins,

I need some sed help. I have a record with two characters that I need to key
off of, in this case the characters WE. Is there anyway to have sed remove
everything after the WE. Kind of a wildcard function?

I do not use sed very much and have been unable to find any information on
this type of operation. So, any help would be greatly appreciated.

Thanks,

Bryan Douglas Quinn
UNIX Support Specialist
HP Certified IT Professional
Cooper Tools - Lexington, SC
803.808.6770
bryan.quinn@coopertools.com

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.0.0/268 - Release Date: 2/23/2006
 
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact
majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner:
owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
search)
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:52 EDT