On Thu, 26 Feb 2004, [iso-8859-2] Roubíček Zdeněk (T-Systems PragoNet) wrote:

>  Any idea what I am missing?

You don't say what you are expecting these awk samples to do...

> >cat test
       ^^^^
There is a command called test, so you should not use that name for test
files.

> 1;1
> 2;2
> >awk -F ';' '{print $1}'
> 1
> 2

This is doing what you've told it.  The field separator is ; and it
prints the first field on each line (assuming you are actually running
it on the 'test' file--the command as shown won't do it).

> >awk -F ' FS=";" {print $1}'
> 1;1
> 2

Don't use the -F option if you are setting the field separator inside
the code.

-Warren Block * Rapid City, South Dakota USA
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to