Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Shell script output in HTML or with table like results and mail Post 302882742 by joy lobo on Thursday 9th of January 2014 03:50:42 AM
Old 01-09-2014
[Solved] Shell script output in HTML or with table like results and mail

Hello,
Currently i have a script which will disply the results in plain text format.
I want to format the result in more readable format like Making bold headings and format with colors etc. Something like html and send that content as email.
Please help me how i can do that.


I am using below script for sending the content:
Code:
filesend=filename
cat mail_ids.txt |while read line
do
  elm -s "TEST" $line < $filesend
done


Last edited by joy lobo; 01-20-2014 at 08:53 AM.. Reason: code tags...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

have a shell script done in pl/sql and want output in html

I have this shell script where I have both pl/sql and sql. But want to have a snigle output file where the result of each cursors are in HTML tables. I was able to do that on my old script but it was only sql scripts (no pl/sql). Can I do have such outputs now with my new script where I... (2 Replies)
Discussion started by: arobert
2 Replies

2. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

3. Shell Programming and Scripting

shell script output in HTML or with table like results

Hello, Currently i have a ksh script which will disply the results in plain text format. I want to format the result in more readable format like Making bold headings and format with colors etc. Something like html or excel format and send that content as email. Please help me how i can do... (2 Replies)
Discussion started by: kotasateesh
2 Replies

4. Shell Programming and Scripting

Bash shell script that inserts a text data file into an HTML table

hi , i need to create a bash shell script that insert a text data file into an html made table, this table output has to mailed.I am new to shell scripting and have a very minimum idea of shell scripting. please help. (9 Replies)
Discussion started by: intern123
9 Replies

5. Shell Programming and Scripting

Convert shell script output txt file to html table

Hi, I have script which generates the output as below: Jobname Date Time Status abc 12/9/11 17:00 Completed xyz 13/9/11 21:00 Running I have the output as a text file. I need to convert it into a HTML Table and sent it thru email ... (6 Replies)
Discussion started by: a12ka4
6 Replies

6. Shell Programming and Scripting

[SOLVED] Read html attachment from /var/mail

Hi, I am receiving an email to the server with a html attachment. When I check the /var/mail the attachment is showing as junk characters. I want to move that html file to a particular location in that server. Please help me. Regards Neethu (4 Replies)
Discussion started by: Neethu
4 Replies

7. Shell Programming and Scripting

Insert an image in HTML mail sent from Shell script

Hi Shell Experts I am trying to insert an image into HTML email through shell script send mail, I have the email text file which included body and the images included in it in html format. Through my Shell script, I am calling the text file and send it through email so it it sends the email with... (21 Replies)
Discussion started by: anji009
21 Replies

8. Shell Programming and Scripting

I want query output to send on mail using table tag and output should be in table

#! /bin/ksh #] && . ./.profile 2>/dev/null if test -f '.profile'; then . ./.profile; fi; #. .profile LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7" ( ... (21 Replies)
Discussion started by: ankit.mca.aaidu
21 Replies

9. Shell Programming and Scripting

Convert shell script output txt file to html table

My concnern related to the post -Convert shell script output txt file to html table, in this how to print the heading as color. awk 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print "</tr>"} END{print "</table>"}' <filename> (8 Replies)
Discussion started by: sarajobmai
8 Replies

10. Shell Programming and Scripting

Postgre Query results as Email HTML table

Hello, I'm trying to send email from Greenplum query results as HTML table with status Red/Green Select Server, Last_Date from Table; Results Server, Last_Date Prod, 2018-04-09 Final email Output in HTML format Server Status LastDate Prod GREEN(BOX) 2018-04-09 (if... (2 Replies)
Discussion started by: krux_rap
2 Replies
PY.TEST(1)							      pytest								PY.TEST(1)

NAME
pytest - pytest usage CALLING PY.TEST THROUGH PYTHON -M PY.TEST New in version 2.0. If you use Python-2.5 or later you can invoke testing through the Python interpreter from the command line: python -m pytest [...] This is equivalent to invoking the command line script py.test [...] directly. GETTING HELP ON VERSION, OPTION NAMES, ENVIRONMENT VARIABLES py.test --version # shows where pytest was imported from py.test --funcargs # show available builtin function arguments py.test -h | --help # show help on command line and config file options STOPPING AFTER THE FIRST (OR N) FAILURES To stop the testing process after the first (N) failures: py.test -x # stop after first failure py.test --maxfail=2 # stop after two failures SPECIFYING TESTS
/ SELECTING TESTS Several test run options: py.test test_mod.py # run tests in module py.test somepath # run all tests below path py.test -k string # only run tests whose names contain a string Import 'pkg' and use its filesystem location to find and run tests: py.test --pyargs pkg # run all tests found below directory of pypkg MODIFYING PYTHON TRACEBACK PRINTING
Examples for modifying traceback printing: py.test --showlocals # show local variables in tracebacks py.test -l # show local variables (shortcut) py.test --tb=long # the default informative traceback formatting py.test --tb=native # the Python standard library formatting py.test --tb=short # a shorter traceback format py.test --tb=line # only one line per failure DROPPING TO PDB (PYTHON DEBUGGER) ON FAILURES Python comes with a builtin Python debugger called PDB. py.test allows one to drop into the PDB prompt via a command line option: py.test --pdb This will invoke the Python debugger on every failure. Often you might only want to do this for the first failing test to understand a certain failure situation: py.test -x --pdb # drop to PDB on first failure, then end test session py.test --pdb --maxfail=3 # drop to PDB for the first three failures SETTING A BREAKPOINT
/ AKA SET_TRACE() If you want to set a breakpoint and enter the pdb.set_trace() you can use a helper: import pytest def test_function(): ... pytest.set_trace() # invoke PDB debugger and tracing In previous versions you could only enter PDB tracing if you disabled capturing on the command line via py.test -s. PROFILING TEST EXECUTION DURATION
To get a list of the slowest 10 test durations: py.test --durations=10 CREATING JUNITXML FORMAT FILES
To create result files which can be read by Hudson or other Continuous integration servers, use this invocation: py.test --junitxml=path to create an XML file at path. CREATING RESULTLOG FORMAT FILES
To create plain-text machine-readable result files you can issue: py.test --resultlog=path and look at the content at the path location. Such files are used e.g. by the PyPy-test web page to show test results over several revi- sions. SENDING TEST REPORT TO POCOO PASTEBIN SERVICE
Creating a URL for each test failure: py.test --pastebin=failed This will submit test run information to a remote Paste service and provide a URL for each failure. You may select tests as usual or add for example -x if you only want to send one particular failure. Creating a URL for a whole test session log: py.test --pastebin=all Currently only pasting to the http://paste.pocoo.org service is implemented. CALLING PY.TEST FROM PYTHON CODE New in version 2.0. You can invoke py.test from Python code directly: pytest.main() this acts as if you would call "py.test" from the command line. It will not raise SystemExit but return the exitcode instead. You can pass in options and arguments: pytest.main(['x', 'mytestdir']) or pass in a string: pytest.main("-x mytestdir") You can specify additional plugins to pytest.main: # content of myinvoke.py import pytest class MyPlugin: def pytest_addoption(self, parser): raise pytest.UsageError("hi from our plugin") pytest.main(plugins=[MyPlugin()]) Running it will exit quickly: $ python myinvoke.py ERROR: hi from our plugin AUTHOR
holger krekel at merlinux eu COPYRIGHT
2011, holger krekel et alii 2.2 June 24, 2012 PY.TEST(1)
All times are GMT -4. The time now is 02:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy