Tuesday, April 16, 2024
48
rated 0 times [  48] [ 0]  / answers: 1 / hits: 62333  / 2 Years ago, mon, november 22, 2021, 10:45:57

How can I make some output bold in Ubuntu terminal



echo "text bold text"

text bold text


or the same from



cat my_file

More From » command-line

 Answers
5

Here's how:



echo -e "text 033[1mbold033[0m text"


See "Colorizing" Scripts tutorial.



It's not possible to do for cat that way. cat will merely print the characters of the file onto standard out. The closest thing I can come up with is the following:



If you put text 033[1mbold033[0m text you can do



echo -e `cat test.txt`

[#44969] Wednesday, November 24, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
afyess

Total Points: 437
Total Questions: 120
Total Answers: 107

Location: San Marino
Member since Fri, Jul 3, 2020
4 Years ago
afyess questions
;