Posted over 5 years ago. Visible to the public.

Bash: Heavy headings for CLI

To print a colored full-width bar on the bash, use this bash script expression:

Copy
echo -e '\033[37;44m\nHEADING\033[0m\nLorem ipsum ...'

In Ruby:

Copy
puts "\033[37;44m\n #{text}\033[0m" # blue bar

Notes: -e turns on escape character interpretation for echo. See this card for details on bash formatting.

The line above will print:

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Dominik Schöler
Last edit:
over 5 years ago
Attachments:
Bildschirmfoto_2014-03-08_um_21.24.55.png
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more