How to draw HTML table having contain result of SQL query and send to mail in Shell scriptHow do I send HTML...

Canteen Cutlery Issue

Query to get counts of values per column

Could Boris Johnson face criminal charges for illegally proroguing Parliament?

Does Hogwarts have its own anthem?

Chain on singlespeed tight, pedals won't turn backwards very freely - is this an issue?

Generating numbers with cubes

Mac no longer boots

What are one's options when facing religious discrimination at the airport?

Why does the Pilatus PC-24 have such a large "Wing Support"?

Citing CPLEX 12.9

Is morphing a creature effectively a cost?

Does the 'java' command compile Java programs?

Sending mail to the Professor for PhD, after seeing his tweet

Is there a way to double indent equations

What makes a character irredeemable?

Check if number is in list of numbers

Bwv 639 Bach/Busoni note length and symbols

Are there types of animals that can't make the trip to space? (physiologically)

Security risks of disabling "Find my iPhone"?

Anonymous reviewer disclosed his identity. Should I thank him by name?

Why is music is taught by reading sheet music?

Parent asking for money after I moved out

Why is there such a singular place for bird watching?

As an interviewer, how to conduct interviews with candidates you already know will be rejected?



How to draw HTML table having contain result of SQL query and send to mail in Shell script


How do I send HTML email using linux 'mail' command?Why does my cronjob not execute my shell-script?How to write down SQL query to get the data count of a table?How to configure 'at' and 'sendmail' to mail output with Content-Type: text/htmlShell script : Redirect sql query output to a file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








0















I want to draw HTML table contain record of SQL query and send to mail in shell script.
Here is the shell script:-



#!/usr/bin/ksh
out=$(for id in 1 2 3 4
do
sqlplus -s <user>/<password>@<db> <<EOF
spool out.txt;
select * from <table> where id=${id};
spool off;
exit;
EOF
done)

echo ${out} > out.txt
(uuencode out.txt out.txt)| cat out.txt| mailx -s "Counts" abc@xyz.com


And I am getting output of the query in different format not HTML table format.



The table format should be like this (in the table)



ID            Results
Before After
1 12 15
2 27 30
3 45 52


Could you please help me to draw HTML table of this record.










share|improve this question









New contributor



Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




























    0















    I want to draw HTML table contain record of SQL query and send to mail in shell script.
    Here is the shell script:-



    #!/usr/bin/ksh
    out=$(for id in 1 2 3 4
    do
    sqlplus -s <user>/<password>@<db> <<EOF
    spool out.txt;
    select * from <table> where id=${id};
    spool off;
    exit;
    EOF
    done)

    echo ${out} > out.txt
    (uuencode out.txt out.txt)| cat out.txt| mailx -s "Counts" abc@xyz.com


    And I am getting output of the query in different format not HTML table format.



    The table format should be like this (in the table)



    ID            Results
    Before After
    1 12 15
    2 27 30
    3 45 52


    Could you please help me to draw HTML table of this record.










    share|improve this question









    New contributor



    Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0












      0








      0


      1






      I want to draw HTML table contain record of SQL query and send to mail in shell script.
      Here is the shell script:-



      #!/usr/bin/ksh
      out=$(for id in 1 2 3 4
      do
      sqlplus -s <user>/<password>@<db> <<EOF
      spool out.txt;
      select * from <table> where id=${id};
      spool off;
      exit;
      EOF
      done)

      echo ${out} > out.txt
      (uuencode out.txt out.txt)| cat out.txt| mailx -s "Counts" abc@xyz.com


      And I am getting output of the query in different format not HTML table format.



      The table format should be like this (in the table)



      ID            Results
      Before After
      1 12 15
      2 27 30
      3 45 52


      Could you please help me to draw HTML table of this record.










      share|improve this question









      New contributor



      Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I want to draw HTML table contain record of SQL query and send to mail in shell script.
      Here is the shell script:-



      #!/usr/bin/ksh
      out=$(for id in 1 2 3 4
      do
      sqlplus -s <user>/<password>@<db> <<EOF
      spool out.txt;
      select * from <table> where id=${id};
      spool off;
      exit;
      EOF
      done)

      echo ${out} > out.txt
      (uuencode out.txt out.txt)| cat out.txt| mailx -s "Counts" abc@xyz.com


      And I am getting output of the query in different format not HTML table format.



      The table format should be like this (in the table)



      ID            Results
      Before After
      1 12 15
      2 27 30
      3 45 52


      Could you please help me to draw HTML table of this record.







      shell-script html sql






      share|improve this question









      New contributor



      Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited 5 mins ago







      Md Wasi













      New contributor



      Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 22 mins ago









      Md WasiMd Wasi

      1011 bronze badge




      1011 bronze badge




      New contributor



      Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Md Wasi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



























          0






          active

          oldest

          votes













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });







          Md Wasi is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded
















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f543983%2fhow-to-draw-html-table-having-contain-result-of-sql-query-and-send-to-mail-in-sh%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          Md Wasi is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded

















          Md Wasi is a new contributor. Be nice, and check out our Code of Conduct.













          Md Wasi is a new contributor. Be nice, and check out our Code of Conduct.












          Md Wasi is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f543983%2fhow-to-draw-html-table-having-contain-result-of-sql-query-and-send-to-mail-in-sh%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...