Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: globbing and set a command



Are you sure you need to set the cpu frequency separately. Most dual core cpu 
can only switch the frequency together and individually.
   cpufreq-info | grep 'switch frequency'

If the output is something like:
  CPUs which need to switch frequency at the same time: 0 1
  CPUs which need to switch frequency at the same time: 0 1
your core only switch together. There is no possibility to set individual 
governors for each of them.


If you like to do it in a loop you can use this one:
  for i in 0 1; do cpufreq-set -c $i -g conservative; done
or if short loops are enabled
  for i (0 1) cpufreq-set -c $i -g conservative


On Wednesday 03 February 2010 08:04:52 ugaciaka wrote:
> Hi,
> 
> for setting the cpu governor I write:
> 
> cpufreq-set -c 0 -g conservative
> 
> cpufreq-set -c 1 -g conservative
> 
> (I have dual core cpu)
> 
> But I want write a unique command like
> 
> cpufreq-set -c (0|1) -g conservative
> 
> I was thinking of doing a for loop, but before I wanted to know if
> there was a  globbing-way.
> 
> Tnx
> 

Attachment: signature.asc
Description: This is a digitally signed message part.



Messages sorted by: Reverse Date, Date, Thread, Author