Literal characters to set US and SO The escape sequences are for Xterm/Gnome This line is entirely normal This line has UL that is switched off with \e[24m UL abcd now non-ul characters This line has SO (standout) that is switched off with \e[27m SO abcd now non-SO characters This line has UL that is switched off with \e[m UL abcd now non-ul characters This line has SO (standout) that is switched off with \e[m SO abcd now non-SO characters Next line: UL SO UL-off SO-off plain UL underlined now add SO SO and UL  SO only  plain again Next line SO UL SO-off UL-off plain SO bold add uline  ul & so  off and  now plain Now doing the same above but ending with \e[m -- which will switch both off Next line: UL SO off plain UL underlined now add SO SO and UL  not SO Next line SO UL off plain SO bold add uline  ul & so  not UL