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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP Warning message ? maheshsri Shell Programming and Scripting 1 02-16-2006 09:21 AM
warning message qphillips UNIX for Dummies Questions & Answers 0 09-28-2005 11:24 AM
warning message in SAM mhbd UNIX for Dummies Questions & Answers 3 08-03-2005 05:00 AM
Warning Message. Silver Filesystems, Disks and Memory 3 11-25-2002 02:45 AM
Sendmail keep a user from send message westside Security 1 07-09-2002 05:51 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-20-2005
Registered User
 

Join Date: Dec 2005
Posts: 4
How to Send warning message to user

Hai..I have one question in unix Shell script.Following is the script

System Configuration: lcpu=4 mem=8192MB
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
2 1 1537569 5572 0 0 1 27 167 0 581 28847 424 6 1 92 1

In the above script ,Field po value greaterthan 9 How to send a waring message to the user.

One more question.By using cut Command i retrieve one value.How could i assign the value to new variable...

Is anyone facing same kind of problem,plz let me know on this regards

Thanks

P.S.Selvan
Reply With Quote
Forum Sponsor
  #2  
Old 12-21-2005
Registered User
 

Join Date: Dec 2005
Location: London
Posts: 222
I assume that the values are in 5th row always

val=$(sed -n '5p' filename | cut -d " " -f 7)

if [ $val -gt 9 ]
then
wall "po value is greater than 9"
fi
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:30 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0