how to bold the characters using echo

required output of echo in bold letters

while using echo command I want the content to be bold and it should have same bold view while appending echo output to the file

echo "hi">test.txt

i want hi should be in bold in the test.txt file

3

1 Answer

.txt is a raw text format: you can't use any type of text-formatting.

Some "generic" conventions are **Bold** and *italic* because a lot of markdown will interpret these as bold and italic.

Another thing that could be usefull to display a bold text is to use bash. But it will of course only work in you display the .txt in a bash-terminal. For this, you can use something like echo -e "\033[1mThis text is bold", but it will be copied 'as it' in the .txt file.

6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like