Hi Nathan,
I am writing Shell script for health status of application. I wrote the script, if server is down it will send alert mail to particular id. I need to send table format(Server list with status ) on body of mail. could you plz help for this issue?
Note : You can use the awk command instead of the nawk command and sendmail instead of the mutt command etc. There are always choices for alternate commands that you can get with simple google search.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I do not have a test system with the sendmail tools, I can't help you any further on this issue.
Probably a Google Search with the mailx command examples, can help you further.
Otherwise, you can raise a ticket on the stackoverflow.com, which will be attended by experts in this area.
Best Regards,
Nathan S.R.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to compare 2 variables in shell script. for ex. list={some application name} list1=some application name } . i need to compare this 2 variable's values. if both are same echo up, if not same echo down. plz guide me for this issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Chitiraikani,
Please see my comments on the Youtube Page : https://www.youtube.com/watch?v=Cck_HnVgJuQ
regarding a similar query, raised by another person.
Regards,
Nathan S.R.
Hi Nathan,
thanks for your response. I am getting some error. if you don`t mind can please provide job support for this issue?
Hi
I am getting html output. but my expection is different. i have attached
expected and output . plz guide me for this issue.
Please go through this easy forum article ( especially the accepted answer ) and achieve what you want : https://unix.stackexchange.com/questions/83340/formating-mail-body-data-into-html-table-format
Note : You can use the awk command instead of the nawk command and sendmail instead of the mutt command etc. There are always choices for alternate commands that you can get with simple google search.
Hi Nathen,
Thanks for your reply.
I need to send alert mail below format
Mail Body- Html table
attachment-yes
guide me for this issue.
Hi Chitiraikani,
Did you see my comments on the Youtube Page : https://www.youtube.com/watch?v=Cck_HnVgJuQ
regarding a similar query, raised by another person.
Anyway, please check these :
https://stackoverflow.com/questions/50650701/send-email-from-unix-command-with-attachment-and-html-message-body
https://stackoverflow.com/questions/31502976/using-mailx-command-for-sending-mail-with-attachment-and-messagebody-in-unix
echo "Body Of the Email" | mutt -a "File_Attachment.csv" -s "Daily Report for $(date)" -c cc_mail@g.com to_mail@g.com -y
$ (echo "something\n" ; uuencode file file) | mailx -s "subject" recipient@somewhere.com
Regards,
Nathan S.R.
Hi Nathan,
I have attachment zip file and HTML Link . i have to send both via sendmail tools
Last edit: Chithiraikani 2022-06-29
Last edit: Chithiraikani 2022-06-29
Hi Chithiraikani,
As I do not have a test system with the sendmail tools, I can't help you any further on this issue.
Probably a Google Search with the mailx command examples, can help you further.
Otherwise, you can raise a ticket on the stackoverflow.com, which will be attended by experts in this area.
Best Regards,
Nathan S.R.
HI Nathan
I need to compare 2 variables in shell script. for ex. list={some application name} list1=some application name } . i need to compare this 2 variable's values. if both are same echo up, if not same echo down. plz guide me for this issue.
Google Search is your best friend:
https://www.google.com/search?q=linux+test+two+conditions
Returns:
https://stackoverflow.com/questions/11370211/two-conditions-in-a-bash-if-statement
https://unix.stackexchange.com/questions/426568/how-to-write-an-if-statement-with-multiple-conditions
Also:
https://www.google.com/search?q=linux+test+examples
Returns:
Hope this helps.