erlug
[Top] [All Lists]

Re: [Erlug] awk or sed?

To: erlug@xxxxxxxxxxxxxx
Subject: Re: [Erlug] awk or sed?
From: Eagleone <andrea.scavolini@xxxxxxxxx>
Date: Mon, 8 Aug 2005 10:44:23 +0200
On 6/29/05, Marco Fabbri <fabbri.marco@xxxxxxxx> wrote:
> Dato un file con N righe, in ogni riga c'e' una stringa molto lunga,
> come si fa ad aggiungere un numero progressivo al termine di ogni
> stringa?
> 
> con
> 
>  > awk -f test.awk eac_esi_map1.par.1
> 
> dice:
> 
> awk: recod 'ES_info$ p: name, s,...' too long
> 
> 
> Il problema e' che le stringhe sono troppo lunghe. Si puo' fare con sed?

E' passato molto tempo ma leggo solo ora. Si puo' fare anche con sed
ma si puo' fare anche semplicemente con:

# Imposto il separatora con "il fine linea"
LISTA=`cat ILTUOFILE.EXT`

IFS="
"

for RIGA in $LISTA
do
echo "$RIGA""LaStringaCheVuoiTu" >> NUOVOFILE.EXT
done

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Erlug] awk or sed?, Eagleone <=