1Can you edit those *.sh files? It would be the ideal solution (look for echo or printf lines). Otherwise if the extra newline is after the text you want, you can append ` | head -1 ` to get the first line of any stdout. (actually I think the standard now is to use ` | head -n1 ` now, but both should work)

2You probably want to use something more specific on your grep, such as ` | grep "drive state is:" `then pipe that to some parsing utility... although you could probably implement everything in 1 command if you use a more powerful tool. So in the end you could add something simple like ` | grep "drive state is:" | cut -21- ` or something more fancy.

An alternative to 2 is to look in those scripts in /etc/init.d and see where they get their info from... where it may be more efficient to parse input from (esp. if you are going to keep running it via torsmo).

I can see that "echo -n" or printf would do the trick if I had the information I need in a variable (eg $PATH) - so I guess I need to figure out how to pass the output from a command into a variable. So far I can see how to pass a constant to a variable (eg VAR=hello, echo -n {$VAR})

| head -c-1 (and variations thereof) results in the error "head: -1: invalid number of bytes"

Edit: I'm guessing something like this will do it but I'm away from dsl-n at the moment: