"Morel Bérenger" <[email protected]> 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."
Chris
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]