Juanito


Group: Members
Posts: 1601
Joined: Sep. 2005 |
 |
Posted: Sep. 27 2007,07:08 |
 |
Quote | Can you edit those *.sh files? |
- Sorry, I didn't explain myself well there. These are files I created to be able to pass the output of a command to torsmo (a la .torsmo_ip).
Thanks for the help, I'm moving nearer to a solution. If I use the commands directly from a terminal window, I get:Code Sample | $ cpufreq-info -mf | head -n1 1.60 GHz $ cpufreq-info -mf | head -c8 1.60 GHzdsl@dslbox:~$ |
So "head -n1" has no effect - "head -c8" works for 1.60 GHz but not for 800 MHz which has one character less.
Similiarly:Code Sample | $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | head -c11 performancedsl@dslbox:~$ |
...works with "performance" and "conservative" but not with "ondemand", "userspace" or "powersave"
Your suggestions for the grep statement worked well:Code Sample | $ sudo /etc/init.d/laptop-mode status | grep "drive state is:" | cut -b22- active/idle |
but then I have the same problem of the output moving onto the next line.
I'll keep working on this - any additional suggestions would be welcome
|