Do we have any command which can trigger html code in shell as we to trigger CSS in html
-
2The shell is not a web browser.SLaks– SLaks2018-12-13 15:18:17 +00:00Commented Dec 13, 2018 at 15:18
-
If your question is "how do I send HTML formatted email from a bash script?", please update it to say thatthat other guy– that other guy2018-12-13 18:45:50 +00:00Commented Dec 13, 2018 at 18:45
Add a comment
|
1 Answer
You can't render html in a shell. If you want to see how HTML in shell looks like, try installing lynx...
ANSI/VT100 terminals and terminal emulators can output colored text (and text background) using escape sequences.
echo -e "\e[31mHello World\e[0m"
outputs red text for example ..
You can get more info here: https://misc.flogisoft.com/bash/tip_colors_and_formatting
4 Comments
Jayanth varma
Can I mail the html output from shell script
eltomato
as html is rendered on the client you can send it from everywhere .. maybe you can help us understand your problem by giving more information. What do you want to achieve?
Jayanth varma
I want to format the shell output using html and send that output through mail
eltomato
do you need colors? You could export it as plaintext (by piping it into a file) and display it inside a "<pre>" Tag (so keep line endings)