[NTLUG:Discuss] More shell scripting madness
Richard Geoffrion
ntlug at rain4us.net
Thu Jul 5 15:35:15 CDT 2007
. Daniel wrote:
> I know it's hard to see, but I'm actually starting to learn this stuff
> little by little.
>
>
I understand COMPLETLY
> Here's the purpose:
>
> I upgraded the processor and video in my laptop. Now it gets warmer than I
> like,
Some have suggested using CPUFREQ instead of i8kfan, but I realize that
you are wanting maximum cpu speed with maximum cooling. I'll leave you
to figure out the "y" of how to do something.
> So I wrote a loop that checks the fan status every two seconds and if it's
> not "2 2" it will set the fans to "2 2" and go back to sleep.
>
> <snip for politeness>
>
> Here's what I'd like to add to it.
>
> <more snippage.
>
While a better more elegant solution most probably exists (Chris Cox
:->) The attached script should match the criteria for doing what you
asked. I think it's all there in educationally commented steps. It's not
a one liner..but something that can be used as a learning tool. I know
*I* learned some stuff. :)
Oh, and if you want to see the file without the comments, you can run:
sed '/^[[:space:]]*#/d;/^$/d <irc://irc.freenode.net/%23/d%3b/%5e%24/d>'
fanscript.txt
(unless you're irc nick is greycat, in which case the above command is
bad evil bad and doesn't work!)
--
Richard
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fanscript.txt
Url: /pipermail/discuss/attachments/20070705/bc0dd9f5/attachment.txt
More information about the Discuss
mailing list