On July 27, 2022 3:47:56 PM GMT+02:00, Andrew Hewus Fresh <and...@afresh1.com> 
wrote:
>On Wed, Jul 27, 2022 at 11:06:39AM +0200, Alexander Hall wrote:
>> I think replacing '*' with '*([![:cntrl:]])' can be the droid your looking 
>> for.
>
>As I was falling asleep last night I was trying to figure out how to get
>'*([!$_nl])' into the match and couldn't think of a good one.  Your
>solution is much better.
>
>I think that would end up looking like: ^cpu0:*([![:cntrl:]])Intel(R)
>although I recall some weirdness with metachars in a variable so I'll
>have to test it out.

Yeah, it was pointed out to me. I was only able to test on ksh93, so that might 
be a dead end.

/Alexander

>
>On Wed, Jul 27, 2022 at 12:01:51PM +0000, Klemens Nanni wrote:
>> On Wed, Jul 27, 2022 at 01:55:58PM +0200, Alexander Hall wrote:
>> > On a sidenote, the
>> > 
>> >     _nl=$(echo)
>> > 
>> > in fw_update.sh is AFAICT deceitful and moot, since ksh strips away 
>> > trailing linefeeds. Use the uglier
>> > 
>> >     _nl='
>> > '
>> > 
>> > instead.
>> 
>> Correct:
>> 
>>      $ _nl=$(echo)
>>      $ printf '%s' "$_nl"
>>      $ _nl='             
>>      > '
>>      $ printf '%s' "$_nl"
>> 
>>      $ printf '\n'
>> 
>>      $
>
>This is correct, I swear I had tested it before and that it worked, but
>I can't reproduce it now.  The switch to per-line was using the ugly
>version.
>
>I'll work up a patch to get that fixed anyway.

Reply via email to