Matthew A. Nicholson wrote:
[EMAIL PROTECTED] wrote:
The /user/sbin/laptop-mode script attempts to call the awk 'asort'
function which is not found in mawk.  Making laptop-mode-tools depend on
gawk or finding another way to get the medium cpuspeed value would solve
the problem.


Ah, I wasn't aware of this. I'll see what I can do. Thanks for reporting!

No prob. Glad to see you so responsive :).

I'm reluctant to depend specifically on gawk, so I've settled for the following as a replacement:

cat "$1" | sed 's/ /\n/g' | sort -n | awk -v RS="" '{n=split($0,a); print a[int((n+1)/2)]}'

This works with both mawk and gawk on my machine.

--Bart


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to