[RESOLVED] - echo -e in italics

Issues related to applications and software problems and general support
Post Reply
User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

[RESOLVED] - echo -e in italics

Post by warron.french » 2021/07/14 12:12:54

I have been able to echo statements in colors for about 5 years. I just today learned of some new escape codes for brighter colors, so that makes me happy.

However, the problem is that I have not ever been able to echo statements in italics or strikethrough (which I just learned might also be a possibility).
I can echo statements in bold without any issue, and I can also echo statements in underline.

I found some links that consistently show the same escape codes, but on RHEL variants the italics and strikethrough just don't work.

Here are some of the links:
https://askubuntu.com/questions/528928/ ... and-size-i shows strikethrough, which does not work for me.
https://en.wikipedia.org/wiki/ANSI_escape_code This one was really useful!

Can anyone tell me, please, with certainty that it is possible to echo text to terminal in italics? How about strikethrough?

I have a .COLORS.txt file that I use as a shrc file for colorizing my echo statements and this is what it looks like:
Attachments
echo_colors.PNG
echo_colors.PNG (26.82 KiB) Viewed 1372 times
Last edited by warron.french on 2021/08/06 19:32:59, edited 1 time in total.
Thanks,
War

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: echo -e in italics

Post by lightman47 » 2021/07/14 20:16:24

strikeout just worked for me (I chose green) in CentOS 7

Code: Select all

echo -e "\e[9m\e[32mTest Strikeout\e[0m"
as did green italics

Code: Select all

echo -e "\e[3m\e[32mTest Italics\e[0m"

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: echo -e in italics

Post by warron.french » 2021/08/06 19:24:17

Sorry lightman47, I never got back to this.

I tried your syntax on the CLI within my PuTTy session on my Linux machine. It did not work, I wonder if PuTTY is part of the problem.


Does it work for you over a PuTTy session? Or are you using a terminal native to your CentOS OS?
Thanks,
War

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: echo -e in italics

Post by lightman47 » 2021/08/06 19:32:01

I don't use putty.

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: echo -e in italics

Post by warron.french » 2021/08/06 19:32:39

I just found a possible reason why this is not working for me...
It's more than likely the fact that I am using PuTTy after all.

I found this linkhttps://en.wikipedia.org/wiki/ANSI_esca ... parameters, which in the table provided within the section for SGR, it actually states "not widely supported."

I will mark this as RESOLVED.
Thanks,
War

Post Reply