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:
[RESOLVED] - echo -e in italics
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
[RESOLVED] - echo -e in italics
- Attachments
-
- echo_colors.PNG (26.82 KiB) Viewed 1375 times
Last edited by warron.french on 2021/08/06 19:32:59, edited 1 time in total.
Thanks,
War
War
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: echo -e in italics
strikeout just worked for me (I chose green) in CentOS 7
as did green italics
Code: Select all
echo -e "\e[9m\e[32mTest Strikeout\e[0m"
Code: Select all
echo -e "\e[3m\e[32mTest Italics\e[0m"
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: echo -e in italics
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?
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
War
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: echo -e in italics
I don't use putty.
- warron.french
- Posts: 616
- Joined: 2014/03/27 20:21:58
Re: echo -e in italics
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.
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
War