Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2007 20:34:37 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        questions@freebsd.org
Subject:   Re: semi-OT: awk - field separator
Message-ID:  <20071115183437.GB2455@kobe.laptop>
In-Reply-To: <18236.36570.116953.110494@jerusalem.litteratus.org>
References:  <18236.36570.116953.110494@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-11-15 13:24, Robert Huff <roberthuff@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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071115183437.GB2455>