haferfrost at web.de
Sun Jul 1 14:43:30 PDT 2001
On 1 Jul 2001, at 0:15, jjones at darkside.dynup.net wrote:
> The current rc script imposes a 3 digit priority limit. While this is fine
> for most, I don't believe any limit should be there. Here is what I've
> come up with to remove this arbitrary limit. This wasn't exactly
> thouroughly tested, but it booted my scripts just fine. :P
> Any side effects I don't see?
> The current:
> suffix=`basename $i | sed 's/^.*[0-9]//'`
> The shell can expand * just as well as the [0-9], and without limit. It'd
> be nice if glob behaved more like POSIX regex's. :)
> basename is already used in the scripts (functions), so I don't see it
> being a problem. sed is pretty standard, too.
> Any thoughts guys?
sed is pretty heavy machinery and as Gerard pointed out it doesn't work.
Take a look at
echo [0-9][^0-9]* [0-9][0-9][^0-9]* [0-9][0-9][0-9][^0-9]*
This sorts those with just 1 digit first, then those with 2 digits, then
those with 3 digits. Maybe you can use this pattern to get what you want.
The early bird gets the worm, but the second mouse gets the cheese.
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
More information about the lfs-dev