Monday, December 4, 2023
48
rated 0 times [  48] [ 0]  / answers: 1 / hits: 62244  / 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
Fri, Jan 6, 23, 21:22, 12 Months ago
Thu, Aug 11, 22, 15:52, 1 Year ago
Sun, Aug 14, 22, 09:58, 1 Year ago
Wed, Sep 28, 22, 09:22, 1 Year ago
;