* mercoledì 06 novembre 2002, alle 15:03, Alessandro Ronchi scrive:
> Avrei bisogno di filtrare un insieme di righe (provenienti in pipe da un
> altro programma), lasciando solamente quelle che hanno meno di n caratteri.
> Si può?
non e` detto che non si faccia in altro modo, cmq, questo dovrebbe
funzionare:
cat yourfile.txt | perl -ane 'chomp; $buf=$_; if (length $buf < __num__)
{ print $buf,"\n"; $buf="" }'
tutto su una riga. sostituisci __num__ con il numero che ti pare.
--
Maurizio - Tannoiser - Lemmo
Founder Member of ERLUG http://erlug.linux.it
-------------------------------------------------------------------------------
Xander: "Ice water. Do you want that on the rocks?"
--Buffy the Vampire Slayer: Beer Bad
|