Re: semi-OT: awk - field separator
Josh Carroll writes: > > 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'"' > > That's a single quote, then a double quote, then another single > quote. Or: That's the ticket. Thanks, everyone. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: semi-OT: awk - field separator
On 2007-11-15 13:24, Robert Huff <[EMAIL PROTECTED]> 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? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
semi-OT: awk - field separator
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 Respectfully, Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: semi-OT: awk - field separator
> 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 awk -F'"' That's a single quote, then a double quote, then another single quote. Or: awk -F\" should also work. Regards, Josh ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"