On Tue, Apr 24, 2001 at 07:18:35PM +0000, Stee Renwick wrote:
> I'm trying to print up the cpu speed in Mhz and I found the file
> /proc/cpuinfo
> So all I need to do is figure out how you print a specfic line,
> I get the felling grep is what I need but I can't get it to print line 15
> only
> Any Ideas how to print a specific line in a file??
this will work:
cat /proc/cpuinfo|grep 'cpu MHz'
and this will just print the number:
cat /proc/cpuinfo|grep 'cpu MHz'|awk '{print $4}'
cheers,
kevin
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!