On Sat, Mar 7, 2009 at 2:47 PM, Lars NoodC)n <larsnoo...@openoffice.org> wrote: > Here are two variations of the standard ksh shell prompt that I myself > find useful on several of my devices, in particular the portables. B The > first prompt shows the temperature on cpu0, the second the amount of > battery claimed to remain: > > B B B B export PS1='`( /sbin/sysctl hw.sensors.cpu0.temp0 | sed -e \ > B B B B "s/^.*\([0-9][0-9]\.[0-9]\)\([0-9]\).*$/\1/g;")`$ ' > B B B B 66.0$ > > B B B B export PS1='`/usr/sbin/apm -l`% $ ' > B B B B 96% $ > > Here is a test using date: > > B B B B export PS1='`/bin/date +"%H:%M:%S"`$ ' > B B B B 14:20:33$
er, there is a \D{format} for that, see ksh(1) backslashed special char for sensors, like \S{name} would be neat thing, though :-)