The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Any command to watch output repeatedly?? sdspawankumar SUN Solaris 2 02-21-2008 01:11 PM
Command similar to "touch" for modify File size sriharshareddyk UNIX for Advanced & Expert Users 3 11-15-2007 01:43 AM
Linux watch command on AIX? djschmitt UNIX for Dummies Questions & Answers 2 11-06-2007 06:00 PM
Command that prints content of line5, or similar? lunchtime Linux 4 07-09-2007 09:58 AM
Command similar to doskey halel UNIX for Dummies Questions & Answers 4 05-16-2006 08:49 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-31-2009
mikejreading mikejreading is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 22
Question Command similar to watch

Hi all,

I am trying to create a file that shows the CPU usage, constantly updating (similar to TOP).

So far i have a file (called test) containing:

Code:
echo "The current CPU usage is:" `ps -e -o pcpu|awk 'NR > 0  { s +=$1 }; END {print s"%"}'`

and then I ran the command:

Code:
watch -d 0.5 -t ./test

This works perfectly, however it runs at full screen. I would like it just to update the line, as I will have other information around it.


Any ideas??
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0