Linux – How to use the ul command line utility

command lineterminalutil-linuxUtilities

I wanted to answer Use _roff to underline words with "just use ul, this command is meant specifically for underlining text", however I just can't grasp how to use it. I thought

$ echo "hello _kitty_ world" > /tmp/foo.txt
$ ul /tmp/foo.txt

would give me an underlined "kitty", however it doesn't. What am I doing wrong?

Best Answer

The input format requires character-backspace-underscore or character-backspace-letter to underline a character. You also get boldface with character-backspace-character.

echo $'hello k\b_i\b_t\b_t\b_y\b_ world' | ul

Less does a similar transformation automatically.

Related Question