| Re: [ssfr] supprimer toutes les lignes d'un fichier commançant par *DEFAULT_S | 
[ Thread Index | 
Date Index
| More debianworld.org/shellscript-fr Archives
] 
- To: shellscript-fr@xxxxxxxxxxxxxxx
 
- Subject: Re: [ssfr] supprimer toutes les lignes d'un fichier commançant par *DEFAULT_S
 
- From: laurent <laurent@xxxxxxxxxx>
 
- Date: Thu, 18 Feb 2010 10:09:06 +0100
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=gamma;        h=domainkey-signature:mime-version:sender:received:in-reply-to         :references:date:x-google-sender-auth:message-id:subject:from:to         :content-type:content-transfer-encoding;        bh=oJW6GLu0RXLw0qi7yR3I0SUcIsT2u99/m37TfPwuppU=;        b=VKRYz5IH3HdFao/bbB4ypiooOuU83U+p2/leys/ST4qG4Z8jlEekvO3oSnsXhmjJVM         92sIlVdqTUF+4PJ/Ji9ywqthV+qhbknH+y4ysyRpvjNQK/AmkpG0LCAwvvb3PQ07Srot         XpeF/tm0inty5SIUnIA/F7BL548n9D57VIrko=
 
- Domainkey-signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;        h=mime-version:sender:in-reply-to:references:date         :x-google-sender-auth:message-id:subject:from:to:content-type         :content-transfer-encoding;        b=Wn56o7l9JexJwZOFOyiNpbNsJnUdWlrTKvDq5WEn8rzbgVoDxrE/kDGSuzBJdi1b6H         Lf4ZIYAfJsnTrcog926BNJftEbcmqqVAJ9uXJ1GpD7D3KGnOCRlcDgqzEmdNpFFW+wjI         pvg4kBpcfbXzNadnZQJ1ebIPzK1gREu0LCv60=
 
2010/2/18 steve <dlist@xxxxxxxxxx>:
> Le 18-02-2010, à 09:55:52 +0100, giggzounet (giggzounet@xxxxxxxxx) a écrit :
>
>> Bonjour,
>
> Yop là !
>
>> et bien tout est dans le titre :
>> j'ai un fichier contenant un grand nombre de lignes. Je cherche à supprimer
>> toutes les lignes qui commencent par *DEFAULT_S. L'étoile faisant partie de
>> la ligne.
>
> sed 's/^\*DEFAULT\_S//' fichier_in > fichier_out
Hum je pense que la tu supprimes pas la ligne mais l'occurrence recherché.
Je ferai plutôt un:
sed -n '/^\*DEFAULT_S/!p' fichier_in > fichier_out
ou
grep -v '^*DEFAULT_S' fichier_in > fichier_out
>
>
>
>
>