On Saturday 09 June 2007 09:23, Randall R Schulz wrote:
> On Saturday 09 June 2007 08:57, Clayton wrote:
> > ...
> >
> > I've also been tinkering with SuperKaramba ...
> > ---------------
> > hddtemp /dev/sda | awk '{print $4}'
> > 33°C
> > -------------
>
> It's nice to see they're using Unicode.
It seems unlikely, but maybe that's the problem? The degree symbol is a
two-byte character. Perhaps SuperKaramba is choking on it?
You could test this by using sed to replace it with something benign
like "degrees".
By the way, cut is probably a better choice for the very simple task of
selecting a field from a line of test. Awk is a bit heavy for this. Be
sure to specify both the separator (-d ' ') and the "don't split
multibyte characters" option (-n).
% dtemp() { hddtemp "$@" | cut -t ' ' -n -f 4; }
% dtemp /dev/sdb
35°C
% dtemp /dev/sdb |sed -e 's/°/ degrees /'
35 degrees C
> > ...
Randall Schulz
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]