Bold text in Linux Bash

Home > Search
  by

The following example from Stack Overflow demonstrates how to make bold text in Bash.

bold=$(tput bold)
normal=$(tput sgr0)
echo "this is ${bold}bold${normal} but this isn't"

 

Running this script will produce the following text.

this is bold but this isn't



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments