Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!elroy!jpl-devvax!lwall
From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall)
Newsgroups: comp.unix.wizards
Subject: Re: number range parsing in sh(1)
Keywords: range, 1,2,4-9,18-
Message-ID: <2691@jpl-devvax.JPL.NASA.GOV>
Date: 19 Aug 88 04:09:46 GMT
References: <469@solaris.UUCP>
Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall)
Organization: Jet Propulsion Laboratory, Pasadena, CA.
Lines: 15

In article <469@solaris.UUCP> wyle@solaris.UUCP (Mitchell Wyle) writes:
: Is there a better way to parse numeric ranges than the following?

[sh script to do ranges omitted]

: Is there a faster way?  How does Larry Wall's mailpatch work?
: 
: Curious minds want to know!

The mailpatch script calls a C program to do the ranges.  The patch sender
built into the dist package is written in perl, which groks numbers a bit
better than sh does.  One of these days I'll rewrite mailpatch in perl and
delete the C program.

Larry Wall
lwall@jpl-devvax.jpl.nasa.gov