On Thu, 26 Feb 2004, [iso-8859-2] Roubí?ek Zden?k (T-Systems PragoNet) wrote:
Hello questions
Any idea what I am missing?
cat test
1;1
2;2
awk -F ';' '{print $1}'
1
2
awk -F ' FS=; {print $1}'
1;1
2
The FS=; is a pattern expression that is used to match the first line
of input,
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
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
Roubíèek Zdenìk (T-Systems PragoNet) said:
Any idea what I am missing?
cat test
1;1
2;2
awk -F ';' '{print $1}'
1
2
awk -F ' FS=; {print $1}'
1;1
2
awk 'BEGIN{FS=;}{print $1}' test
--
Regards,
Doug
___
[EMAIL PROTECTED] mailing list