command line text formating anyone?
I have a web page that is dynamically built using echo and sensors.
I want to filter and format the output of sensors. I want to pipe the lines through something to filter them so that I don't get the (min = +1.60 V, max = +1.67 V) stuff I know this has got to be very simple but have not done a lot of this stuff. here is a sample of what I have viewed in a web browser...... System Voltages CPU core: +1.62 V (min = +1.60 V, max = +1.67 V) I/O: +3.41 V (min = +3.38 V, max = +3.44 V) +5V: +4.97 V (min = +4.95 V, max = +5.05 V) +12V: +12.18 V (min = +11.94 V, max = +12.24 V) System Temperatures CPU Temp: +119.9°F (limit = +131°F, hysteresis = +140°F) SYS Temp: +97.7°F (limit = +113°F, hysteresis = +121°F) this is built like this OF=/var/www/html/sysmon.html sensors -s echo "<html>" > $OF echo "<b>Page Last Updated: </b>" >> $OF date >> $OF echo "<p>" >> $OF echo "<b>System Up Since: </b>" >> $OF cat /var/log/up.log >> $OF echo "<p>" >> $OF echo "<b>System Voltages</b>" >> $OF echo "<p>" >> $OF sensors -f |grep "CPU core" >> $OF echo "<p>" >> $OF sensors -f |grep "I/O" >> $OF echo "<p>" >> $OF sensors -f |grep "+5V" >> $OF echo "<p>" >> $OF :Pengy: |
sensors -f | grep "CPU core" | cut -d"(" -f1
bosh. incidentally, you have the same name as my dad, so when you post, i always think of him. awwwwwwww |
:D
Thanks for the info it will open a few more possibilities. Cool, I have a son with the same name. :Pengy: |
All times are GMT -5. The time now is 05:21 PM. |