grep, etc

Bob Stockler bob at trebor.iglou.com
Thu Aug 19 08:37:10 PDT 2004


On Thu, Aug 19, 2004 at 11:08:42AM -0400, Jay R. Ashworth wrote:
| On Thu, Aug 19, 2004 at 10:46:32AM -0400, Bill Vermillion wrote:
| > > Well, in the *exact* instance he used as an example, it would work.
| > 
| > > But what happens if he wants -213 through -226?
| > 
| > grep '-2[12][3-6]$' file  :-)
| 
| Which precisely illustrates my point as to why it wouldn't work.
| 
| That won't match -217 through -222. 
| 
| If the criterion is in fact numeric, treating the numbers as strings
| won't work.

I don't think grep knows the difference between numbers and
strings.  AWKs do, but sometimes they don't care.

Bob

-- 
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).


More information about the Filepro-list mailing list