From owner-freebsd-questions@FreeBSD.ORG Thu Nov 15 18:35:12 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5AFC16A417 for ; Thu, 15 Nov 2007 18:35:12 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 184E513C4CC for ; Thu, 15 Nov 2007 18:35:11 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id lAFIYhHL019459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Nov 2007 20:34:49 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id lAFIYboE002513; Thu, 15 Nov 2007 20:34:38 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id lAFIYb7f002512; Thu, 15 Nov 2007 20:34:37 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 15 Nov 2007 20:34:37 +0200 From: Giorgos Keramidas To: Robert Huff Message-ID: <20071115183437.GB2455@kobe.laptop> References: <18236.36570.116953.110494@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18236.36570.116953.110494@jerusalem.litteratus.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.996, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.40, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: questions@freebsd.org Subject: Re: semi-OT: awk - field separator X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2007 18:35:12 -0000 On 2007-11-15 13:24, Robert Huff 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?