Waldemar Brodkorb dixit:

>> +       datanr=$(awk -F : '/data/ { print $1 }' /proc/mtd |sed "s#mtd##")
>> 
>> Why not like fwcf?
>> 
>> part=/dev/mtd/$(fgrep '"fwcf"' /proc/mtd 2>&- | sed 
>> 's/^mtd\([^:]*\):.*$/\1/')ro

>More easy? Hmm, this seems to be your personal opinion :}
>Your regex is far more complex than mine. My patch seems to solve
>the Netgear problems, so I will commit it this way.

It doesn't involve awk though. It's easy:

<beginning of line> mtd <anything up to colon = \1> : <anything> <end of line>
is replaced with
<\1 = the "anything up to a colon" above>

//mirabile
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.              -- Coywolf Qi Hunt
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to