Menu

#2 Shell script Issue

1.0
open
None
2022-07-03
2022-06-23
No

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?

Discussion

  • Nathan S.R.

    Nathan S.R. - 2022-06-23

    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.

     
  • Chithiraikani

    Chithiraikani - 2022-06-24

    Hi Nathan,

    thanks for your response. I am getting some error. if you don`t mind can please provide job support for this issue?

     
  • Chithiraikani

    Chithiraikani - 2022-06-24

    Hi
    I am getting html output. but my expection is different. i have attached
    expected and output . plz guide me for this issue.

     
  • Nathan S.R.

    Nathan S.R. - 2022-06-25

    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.

     
  • Chithiraikani

    Chithiraikani - 2022-06-28

    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.

     
  • Chithiraikani

    Chithiraikani - 2022-06-29

    Hi Nathan,

    I have attachment zip file and HTML Link . i have to send both via sendmail tools

     
  • Chithiraikani

    Chithiraikani - 2022-06-29

    i have attached input and output of this issue

     

    Last edit: Chithiraikani 2022-06-29
  • Chithiraikani

    Chithiraikani - 2022-06-29

    input

     

    Last edit: Chithiraikani 2022-06-29
  • Nathan S.R.

    Nathan S.R. - 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.

     
  • Chithiraikani

    Chithiraikani - 2022-07-03

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.