I’m writing a Bash script that prints some text to the screen:
echo "Some Text"
Can I format the text? I would like to make it bold.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most compatible way of doing this is using
tputto discover the right sequences to send to the terminal:then you can use the variables
$boldand$normalto format things:gives
Note that
normalwill turn off all formatting (so if you have other formatting – such as colours – that will be disabled, too).