LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 11-24-2001, 11:35 PM   #1
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
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.9F (limit = +131F, hysteresis = +140F)

SYS Temp: +97.7F (limit = +113F, hysteresis = +121F)

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






 
Old 11-25-2001, 05:30 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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
 
Old 11-25-2001, 07:26 PM   #3
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Original Poster
Rep: Reputation: 56


Thanks for the info it will open a few more possibilities.


Cool, I have a son with the same name.


 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enhanced command line text editor netsoft2005 Linux - Software 2 07-14-2005 08:42 AM
chpasswd from a command line (without a text file) mpgram Linux - Security 1 04-18-2004 06:44 PM
Copy text from command line Duukkis Linux - General 8 08-25-2003 02:29 PM
VI text editor in command line InSane103 Linux - Software 4 07-09-2003 10:04 PM
Command line Text Terri Linux - General 8 04-05-2002 04:10 PM


All times are GMT -5. The time now is 11:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration