The most compatible way of doing this is using tput
to discover the right sequences to send to the terminal:
bold=$(tput bold)
normal=$(tput sgr0)
then you can use the variables $bold
and $normal
to format things:
echo "this is ${bold}bold${normal} but this isn't"
gives
this is bold but this isn't
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…