Skip to content
Advertisement

Bash terminal and color output [closed]

I have a shell with colors enabled:

JavaScript

somefile contains escape characters for coloring. Now I want to output somefile to the terminal with its coloring. I tried:

JavaScript

But there isn’t any formatting at all. The only way I found is by using

JavaScript

But I don’t want a pager. I just want to output the file and do not enter some interactive mode. There must be a simple command to do that, but I wasn’t able to find it 🙂

Advertisement

Answer

The command I was looking for is called ul (do underlining):

JavaScript

It formats the BACKSPACE escape format from groff nicely for the terminal.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement