For Programmers: Free Programming Magazines  


Home > Archive > AWK > March 2004 > Re: Repetition : how to use it ?!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Repetition : how to use it ?!
JB

2004-03-26, 11:09 pm

Hi.
Yes it work now.
The only trouble that I've was link to the fact that I use the scripted
form of awk so I must execute it like this :
./script_name --posix <data_file>
I'vent found a way to put the --posix in the script file.

In all case thanks to all of you.


"Patrick TJ McPhee" <ptjm@interlog.com> wrote in message
news:c3drjn$cbv$1@news.eusc.inter.net...
> In article <c3bpud$ord1@news.rd.francetelecom.fr>,
> JB <jacky.buyck@francetelecom.com> wrote:
>
> % The following command must extract all group of 1, 2 or 3 digits :
> % gawk --posix '/^[0-9]\{1,3\}/ {print $0}' < test
>
> It should be {1,3}, not \{1,3\}.
>
> You need to anchor the RE if you want to avoid matching numbers of
> more than three digits.
> --
>
> Patrick TJ McPhee
> East York Canada
> ptjm@interlog.com



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com