Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

how to grep the vaule in mailx option

SOLVED
Go to solution
rajesh73
Super Advisor

how to grep the vaule in mailx option

how to grep the value in subject of mailx options

command

mailx -s "Server CPU utilization reached 80% & Above" help@onesource.com < /home/raj/log

question

i want to inclue one text vaule in subject of this mail. how can i inclue this vaule in subject.

this vaule file availble in /home/raj/value

pls help me
4 REPLIES
Shibin_2
Honored Contributor
Solution

Re: how to grep the vaule in mailx option

Try like this:

mailx -s "Server CPU utilization reached 80% & Above `cat /home/raj/log`" help@onesource.com
Regards
Shibin
Jose Mosquera
Honored Contributor

Re: how to grep the vaule in mailx option

Hi,

The file /home/raj/value only contains this value or need filter conditions to isolate it?

Rgds
rajesh73
Super Advisor

Re: how to grep the vaule in mailx option

Hi,

thanks for your input now able to grep the vaule.


thanks.
Dennis Handly
Acclaimed Contributor

Re: how to grep the value in mailx option

>Shibin: Try like this:

You can improve this to:
mailx -s "Server CPU utilization reached 80% & Above $(< /home/raj/log)" help@onesource.com