Re: Highlighting CLI output: what are these terms called?
"Morel Bérenger" <email@example.com> wrote:
> Le Mer 17 avril 2013 10:22, Dotan Cohen a écrit :
>> tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$&\e[0m/g'
> Those are escape sequences from VT100 IIRC.
These escape sequences do not need to be embedded into your programs;
they can be derived in a terminal-independent manner. See "man 5 terminfo"
for gory details.
Here's an example that will display "world" in standout - but only on
suitably capable terminals:
echo "Hello" $(tput smso)"world"$(tput rmso) "as you can see."