0

Do we have any command which can trigger html code in shell as we to trigger CSS in html

2
  • 2
    The shell is not a web browser. Commented 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 that Commented Dec 13, 2018 at 18:45

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

4 Comments

Can I mail the html output from shell script
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?
I want to format the shell output using html and send that output through mail
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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.