Groups | Search | Server Info | Login | Register


Groups > comp.lang.awk > #142

Re: Field separator ") "

From pk <pk@pk.invalid>
Newsgroups comp.lang.awk
Subject Re: Field separator ") "
Date 2011-04-08 21:42 +0100
Organization Aioe.org NNTP Server
Message-ID <inns5v$ulr$1@speranza.aioe.org> (permalink)
References <9d58baa3-335b-4355-981f-98864946391a@r6g2000vbz.googlegroups.com>

Show all headers | View raw


On Fri, 8 Apr 2011 13:41:06 -0700 (PDT)
Philip <phil.ganchev@gmail.com> wrote:

> How can I use ") " as the field separator? The manual says that if FS
> is a string of more than one character, then it is treated as a
> regular expression. But when I try this it does not work:
> 
> awk -F '\) ' '{print "hello"; exit}' mydatafie
> awk: warning: escape sequence `\(' treated as plain `('
> awk: fatal: Invalid regular expression: / (/
> 
> awk -F ' (' '{print "hello"; exit}' mydatafie
> awk: fatal: Invalid regular expression: / (/
> 
> awk --version
> GNU Awk 3.1.7
> Copyright (C) 1989, 1991-2009 Free Software Foundation.
> ...

Use -F '\\) '  or -F ' \\('

Back to comp.lang.awk | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Field separator ") " Philip <phil.ganchev@gmail.com> - 2011-04-08 13:41 -0700
  Re: Field separator ") " pk <pk@pk.invalid> - 2011-04-08 21:42 +0100
    Re: Field separator ") " Philip <phil.ganchev@gmail.com> - 2011-04-08 13:50 -0700
      Re: Field separator ") " pk <pk@pk.invalid> - 2011-04-08 22:01 +0100

csiph-web