POV-Ray : Newsgroups : povray.off-topic : Other people dislike regexes too : Re: Other people dislike regexes too Server Time
29 Jul 2024 08:18:01 EDT (-0400)
  Re: Other people dislike regexes too  
From: Francois Labreque
Date: 17 Jul 2012 10:21:33
Message: <500574ed$1@news.povray.org>

> On 2012-07-17 04:47, Invisible wrote:
>>>> dmesg | egrep '(s|h)d[a-z]'
>>>
>>> If you want to build your straw man, at least use examples that conform
>>> to your straw man. That's a bad example because it can be understood in
>>> about 2 seconds.
>>
>> OK, so what does it do?
>>
>> Clearly it runs dmesg and searches the output for some search term. But
>> what is the search term?
>
> *I'LL* handle this one! Wa ha.
>
> It's looking for one of the following:
> ada adb adc ... adx ady adz
> hda hdb hdc ... hdx hdy hdz
>
> ...I think.

Yep, but you have a typo in your answer.

Basically, it parses the output of the dmesg command looking for lines 
that talk about hard disks (hda-hdz for IDE/SATA and sda-sdz for SCSI)

-- 
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/*    flabreque    */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/*        @        */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/*   gmail.com     */}camera{orthographic location<6,1.25,-6>look_at a }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.