Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: davide@lucchesi.eu.org (Davide Lucchesi)
Subject: Re: facile..
Date: 22 Nov 2001 00:59:21 -0800	[thread overview]
Message-ID: <13ac9dc9.0111220059.1107972d@posting.google.com> (raw)
In-Reply-To: 9tglpg$6ip$1@canarie.caspur.it

"GiMan" <giomen2000_NOSPAM@iol.it> wrote in message news:<9tglpg$6ip$1@canarie.caspur.it>...
> ciao tutti..
> come faccio a eliminare le ultime tre righe da tutto un gruppo di files?
> vorrei usare sed, o awk..

Ci sono sicuramente delle soluzioni piu' efficienti, ma questa e'
particolarmente divertente...

for i in ELENCO DEI FILE; do
    head -$(( `wc -l $i | awk '{print $1}'` - 3 )) $i > $i.new
    mv $i.new $i
done

--
Dave


  reply	other threads:[~2001-11-22  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-21 16:43 facile GiMan
2001-11-22  8:59 ` Davide Lucchesi [this message]
2001-11-22 14:54   ` facile Roberto Costa
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox