semi-OT: awk - field separator
Giorgos Keramidas
keramida at ceid.upatras.gr
Thu Nov 15 10:35:12 PST 2007
On 2007-11-15 13:24, Robert Huff <roberthuff at rcn.com> wrote:
> What is the canonical way to get (FreeBSD default) awk to use a
> single double-quote as the field separator? I have tried variations
> on -F\\\" and -F"\"" and the best I can get is:
>
> + awk -F" {print $2}
> ./script.sh: 1: Syntax error: word unexpected
Any of the following should work:
awk -F\" ...
awk -F"\"" ...
awk -F'"' ...
I see that this is part of a script (the '+' character at the start of
the line). Can you show us the *exact* contents of the script at the
point where awk(1) is called?
More information about the freebsd-questions
mailing list