Stephen says:
> "Russell" == Russell Coker <[EMAIL PROTECTED]> writes:
>Russell> Right. The s/[0-9]+$// should do it.
>
>
>
> s/\d+$// not s/[0-9]+$//. The former will continue to work in Unicode
> capable file-systems (assuming Linux ever supports such).
>
>
It supports them right now - t
> "Russell" == Russell Coker <[EMAIL PROTECTED]> writes:
Russell> Right. The s/[0-9]+$// should do it.
s/\d+$// not s/[0-9]+$//. The former will continue to work in Unicode
capable file-systems (assuming Linux ever supports such).
Nothing to see here, move along...
--
Stephen
"An
* (Colin Watson)
| >For a non-POSIX regex, that is.
|
| Could you point me to some documentation about this? regex(7) claims to
| describe POSIX 1003.2 regular expressions, and describes leftmost-first
| behaviour.
Hmm. Strange. Mastering Regular Expressions by O'Reilly has
something about th
Tollef Fog Heen <[EMAIL PROTECTED]> wrote:
>* (Colin Watson)
>| Contrary to the subconscious assumption many people make, the first
>| priority for a regex is to match earliest, not to match longest.
>| regex(7) specifically mentions this:
>
>For a non-POSIX regex, that is.
Could you point me to
On Wednesday 03 January 2001 00:24, Tollef Fog Heen wrote:
> | My lilo configuration scripts need to be able to infer the correct
> | location for the MBR. I am currently using the following algorithm:
> | take root fs device from /etc/fstab and do the following:
> | s/[0-9]*//
> | s/part$/disc/
>
* (Colin Watson)
| Contrary to the subconscious assumption many people make, the first
| priority for a regex is to match earliest, not to match longest.
| regex(7) specifically mentions this:
For a non-POSIX regex, that is.
| >However, stylistically s/[0-9]*// is better written as s/[0-9]+//
|
Bart Schuller <[EMAIL PROTECTED]> wrote:
>On Tue, Jan 02, 2001 at 02:24:22PM +0100, Tollef Fog Heen wrote:
>> | s/[0-9]*//
>> | s/part$/disc/
>>
>> What is the use of the first s/? Unless your first letter is a digit,
>> it will just remove the zero-width string '' between the first / and
>> the
* Goswin Brederlow
| > s/[0-9]$//
|
| > which will remove 5 from /dev/hda5.
|
| You forgot /dev/hda17, which would become /dev/hda1 with your syntax.
you are right.
make that regexp a s/[0-9]+$// instead.
--
Tollef Fog Heen
Unix _IS_ user friendly... It's just selective about who
* Bart Schuller
| On Tue, Jan 02, 2001 at 02:24:22PM +0100, Tollef Fog Heen wrote:
| > | s/[0-9]*//
| > | s/part$/disc/
| >
| > What is the use of the first s/? Unless your first letter is a digit,
| > it will just remove the zero-width string '' between the first / and
| > the beginning of the
> " " == Tollef Fog Heen <[EMAIL PROTECTED]> writes:
> * Russell Coker | My lilo configuration scripts need to be able
> to infer the correct location | for the MBR. I am currently
> using the following algorithm: | take root fs device from
> /etc/fstab and do the followin
On Tue, Jan 02, 2001 at 02:24:22PM +0100, Tollef Fog Heen wrote:
> | s/[0-9]*//
> | s/part$/disc/
>
> What is the use of the first s/? Unless your first letter is a digit,
> it will just remove the zero-width string '' between the first / and
> the beginning of the string.
>
> A better solution
* Russell Coker
| My lilo configuration scripts need to be able to infer the correct location
| for the MBR. I am currently using the following algorithm:
| take root fs device from /etc/fstab and do the following:
| s/[0-9]*//
| s/part$/disc/
What is the use of the first s/? Unless your firs
My lilo configuration scripts need to be able to infer the correct location
for the MBR. I am currently using the following algorithm:
take root fs device from /etc/fstab and do the following:
s/[0-9]*//
s/part$/disc/
The latter is for devfs.
Now for the benefit of RAID systems I need to do:
if
13 matches
Mail list logo