# How to use the ul command line utility

I wanted to answer http://unix.stackexchange.com/questions/3043/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?

-

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.

-
To enter Backspace in vim, press [strg] + [v] in INSERT mode and then enter 08. – echox Oct 12 '10 at 22:02
_\bf_\bo_\bo will also work. – echox Oct 12 '10 at 22:04
@echox: for the non-Germanophones in the audience, that's Ctrl+V. And a handier way is Ctrl+V Ctrl+H (Ctrl+V Backspace may or may not give the right character depending on your terminal configuration.) – Gilles Oct 12 '10 at 22:13