how to grep the vaule in mailx option (171 Views)
Reply
Super Advisor
rajesh73
Posts: 431
Registered: ‎03-17-2009
Message 1 of 5 (171 Views)
Accepted Solution

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
Please use plain text.
Honored Contributor
Shibin_2
Posts: 711
Registered: ‎11-11-2005
Message 2 of 5 (171 Views)

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
Please use plain text.
Honored Contributor
Jose Mosquera
Posts: 1,013
Registered: ‎06-27-2002
Message 3 of 5 (171 Views)

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
Please use plain text.
Super Advisor
rajesh73
Posts: 431
Registered: ‎03-17-2009
Message 4 of 5 (171 Views)

Re: how to grep the vaule in mailx option

Hi,

thanks for your input now able to grep the vaule.


thanks.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,767
Registered: ‎03-06-2006
Message 5 of 5 (171 Views)

Re: how to grep the value in mailx option

[ Edited ]

>Shibin: Try like this:

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

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation