Fedora Linux Support Community & Resources Center
  #1  
Old 6th July 2008, 03:16 PM
storskogen Offline
Registered User
 
Join Date: Sep 2006
Location: Sweden
Age: 36
Posts: 58
remove unwanted stuff with sed

Im trying to get conky to show my current cpu-speed

Code:
${execi 5 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //' | sed -e 's/@ //' | tail -n1} @ ${execi 5 cat /proc/cpuinfo | grep -w cpu\ MHz | sed -e 's/cpu.*MHz.*://' | sed -e 's/000//' | tail -n1}Mhz
but get i cant get rid of the last . when running at 800Mhz (showing 800.MHz), when running at 2Ghz it shows '2.000MHz'

Im not sure if thats understandable :$
__________________
Laptop: Fujitsu-Siemens Amilo Li1718 Fedora 8/WinXP/Fedora 10
Desktop: AMD Athlon 64 X2 Fedora 8/WinXP (only for games)
Mediaplayer: MacMini G4 OS-X Tiger (kitchen)
Server: Mini-ITX Epia ME6000 Fedora 10
Reply With Quote
  #2  
Old 6th July 2008, 03:35 PM
MSK61 Offline
Registered User
 
Join Date: May 2008
Location: Giza, Egypt
Age: 32
Posts: 167
A little more clarification please. I don't understand exactly what your problem is.
Reply With Quote
  #3  
Old 6th July 2008, 05:55 PM
archo Offline
Registered User
 
Join Date: May 2007
Posts: 15
Try changing the last
Code:
sed -e 's/000//'
to
Code:
 sed -e 's/\.000.*$//'
__________________
----------------------------
My laptop smolt profile
Reply With Quote
Reply

Tags
remove, sed, stuff, unwanted

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove unwanted kernels larryt Using Fedora 6 4th August 2007 08:04 PM
remove an unwanted rpm Jeff Sadowski Using Fedora 2 22nd March 2007 06:05 PM
how to remove unwanted driver first007boy Hardware & Laptops 6 14th January 2006 03:46 AM
How to disable or remove unwanted plug-in from firefox first007boy Using Fedora 2 18th October 2005 09:09 AM
how do i remove unwanted charaters at "script" command output? linuxzouk Using Fedora 1 16th May 2004 12:05 AM


Current GMT-time: 10:26 (Saturday, 22-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Al Jahra Photos - Tan An - Jabal os Saraj Photos on Instagram