"Davide Lucchesi" a �crit dans le message news: 13ac9dc9.0111220059.1107972d@posting.google.com... > "GiMan" 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 Why don't you use the following? for i in LIST OF FILES; do tail -3 $i > $i.new mv $i.new $i done However I agree this is much less funny than using sed or awk. :-) Roberto