[nycphp-talk] [OT] grep assistance
Jon Baer
jonbaer at jonbaer.com
Fri Sep 29 00:23:11 EDT 2006
He is right, awk for a number range works wonders ...
echo "123" | awk '//{n=$1;if(n>100 && n<200)print}'
- Jon
On Sep 28, 2006, at 10:19 PM, Paul Houle wrote:
> Peter Sawczynec wrote:
>> 62[8-9]|6[3-9][0-9]|7[0-8][0-1]
>>
>> Using your clues, above will match 628 through 781 only, correct?
>>
>> Peter
>>
> No, it doesn't match 779. This is why awk is a better way to do
> this than grep... It's too hard to understand what these regexes
> do and
> too easy to make a mistake writing them.
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
More information about the talk
mailing list