8

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?

fschmitt
  • 8,720
  • 35
  • 46

1 Answers1

10

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.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175