[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:
Last edited by joy lobo; 01-20-2014 at 08:53 AM..
Reason: code tags...
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
py.test
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)