Problem with sed and awk - SOLVED

Roubíček Zdeněk (T-Systems PragoNet) Zdenek.Roubicek at pragonet.cz
Thu Feb 26 07:52:51 PST 2004


 Sorry for not very clearly formulated question. I wrote those commands by hand and obviously with lot of errors.

> 
> > >awk -F ' FS=";" {print $1}'
> > 1;1
> > 2
> 
> Don't use the -F option if you are setting the field separator inside
> the code.
> 

 This was a mistake. 

The problem is solved by 
awk 'BEGIN{FS=";"}{print $1}' testfile 

as suggested by Dough Poland. 

Thx for the replies.

 r.

Zdenek Roubicek

Department of Network Management
T-Systems PragoNet, a.s.
Na Pankráci 1685/19,140 21 Prague 4
Phone : +420 2 3609 9615		
Fax   : +420 2 3609 9999
E-Mail: zdenek.roubicek at pragonet.cz

 


More information about the freebsd-questions mailing list