Afficher un message
Vieux 26/08/2006, 20h43   #7
Xicheng Jia
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: newbie question: remove lines from text-file

First Lensman wrote:
> I would recommend learning perl and regular expressions. Try using the
> following script:
>
> Script Name: unclog.pl (or whatever you want to call it)
> =======================
> #!/usr/bin/perl -wn
>
> print if (!/^.*\.{9} .*$/);
>
> Make sure the permissions on unclog.pl are set to execute (i.e. 770)
>
> Then run the script as follows:
>
> unclog.pl wget-log > wget-unclog
>


why not issue it directly on the command line:

perl -ne 'print if not /(??:\.){9} ){6}/' wget-log > wget-unclog

Xicheng

  Réponse avec citation
 
Page generated in 0,06152 seconds with 9 queries