I want to print bold text using printf
. How do I do it?
printf '%s\n' "\033[1m"bold_text"\033[0m"
doesn't work. It displays:
\033[1mbold_text\033[0m
However, the same string works fine with echo -e
:
echo -e "\033[1m"bold_text"\033[0m"
bold_text