Font Size In Shell Script
On execution of my script I want the font size of few echo commands to be bigger than the other things displayed. Is there any way to do that?
2 Answers
In plain text mode there's no standard way to get bigger fonts, I think. Many terminal emulators support colors and this may be used to distinguish some text.
However you can build large characters with regular characters. To do this use figlet (and see this).
$ figlet "Super User" ____ _ _
/ ___| _ _ _ __ ___ _ __ | | | |___ ___ _ __
\___ \| | | | '_ \ / _ \ '__| | | | / __|/ _ \ '__| ___) | |_| | |_) | __/ | | |_| \__ \ __/ |
|____/ \__,_| .__/ \___|_| \___/|___/\___|_| |_|There's also toilet (see this).
$ toilet "Super User" mmmm m m #" " m m mmmm mmm m mm # # mmm mmm m mm "#mmm # # #" "# #" # #" " # # # " #" # #" " "# # # # # #"""" # # # """m #"""" # "mmm#" "mm"# ##m#" "#mm" # "mmmm" "mmm" "#mm" # # "Refer to their manuals and search web for graphics to see what these tools can do. Your search query should be like linux toilet instead of plain toilet for obvious reason.
Compare also this question.
If you want your text to be even fancier then check this out:
$ figlet "Hello World!" | cowsay -n ________________________________________________________
/ _ _ _ _ __ __ _ _ _ \
| | | | | ___| | | ___ \ \ / /__ _ __| | __| | | |
| | |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` | | |
| | _ | __/ | | (_) | \ V V / (_) | | | | (_| |_| |
| |_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_(_) |
\ / -------------------------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||Of course you need to install cowsay first.
You could use ASCII art (well, ANSI art, now). There are sites that will process your text for you, too. Just echo each line separately.
For example, an error message:
1