looking for your advise.. i have expect script which execute perfectly and save output to a file, filename is 'fileout'.. output from fileout shows like below..
NAME STATE
--------------------------------------------------------------------
Data Listener not running
DB Server not running
EST Service running
Profiler not running
Indexing Engine disabled
AD Listener not running
I am trying to use script..condition is.. if EST service state show any other state other than running then it should send mail and if not then keep continue running at define interval(10min)..i am using nohup for this but it looks there is some problem in my script to match such condition so looking for you advise.
tail -f fileout | stdbuf -oL grep not running | mailx -s "notification" -r "from@xyz.com" "to@xyz.com"