Re: Highlighting CLI output: what are these terms called?

2013-04-18 Thread Chris Davies
Morel Bérenger berenger.mo...@neutralite.org 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

Re: Highlighting CLI output: what are these terms called?

2013-04-18 Thread Dotan Cohen
On Wed, Apr 17, 2013 at 11:38 AM, Morel Bérenger berenger.mo...@neutralite.org wrote: Those are escape sequences from VT100 IIRC. And, if I am not wrong, they are quite the same as those used in ecma-48, which have free (as in free beer) specifications downloadable here:

Re: Highlighting CLI output: what are these terms called?

2013-04-18 Thread Dotan Cohen
On Wed, Apr 17, 2013 at 8:17 PM, Bob Proulx b...@proulx.com wrote: The only regexp replacement in the right hand side is $. The perlre docs say: man perlre $ returns the entire matched string. (At one point $0 did also, but now it returns the name of the program.) This

Re: Highlighting CLI output: what are these terms called?

2013-04-18 Thread berenger . morel
Le 18.04.2013 16:25, Dotan Cohen a écrit : On Wed, Apr 17, 2013 at 11:38 AM, Morel Bérenger berenger.mo...@neutralite.org wrote: Those are escape sequences from VT100 IIRC. And, if I am not wrong, they are quite the same as those used in ecma-48, which have free (as in free beer)

Re: Highlighting CLI output: what are these terms called?

2013-04-18 Thread Dotan Cohen
On Thu, Apr 18, 2013 at 11:04 AM, Chris Davies ch...@roaima.co.uk wrote: 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

Re: Highlighting CLI output: what are these terms called?

2013-04-18 Thread Bob Proulx
Dotan Cohen wrote: Bob Proulx wrote: tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$\e[0m/g' Instead of that I would be inclined to use grep's --color option. Same thing but easier to type and remember. tail -f file.log | grep --color keyword Thank you Bob. I like how you

Highlighting CLI output: what are these terms called?

2013-04-17 Thread Dotan Cohen
The following page has a nice example of how to highlight text in logfiles: http://www.euperia.com/linux/how-to-highlight-keywords-when-using-tail/903 Here is the example: tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$\e[0m/g' What are the regex replacements in the second part of the

Re: Highlighting CLI output: what are these terms called?

2013-04-17 Thread Loïc Grenié
2013/4/17 Dotan Cohen dotanco...@gmail.com: The following page has a nice example of how to highlight text in logfiles: http://www.euperia.com/linux/how-to-highlight-keywords-when-using-tail/903 Here is the example: tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$\e[0m/g' What are the

Re: Highlighting CLI output: what are these terms called?

2013-04-17 Thread Morel Bérenger
Le Mer 17 avril 2013 10:22, Dotan Cohen a écrit : The following page has a nice example of how to highlight text in logfiles: http://www.euperia.com/linux/how-to-highlight-keywords-when-using-tail/903 Here is the example: tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$\e[0m/g' What

Re: Highlighting CLI output: what are these terms called?

2013-04-17 Thread Dotan Cohen
On Wed, Apr 17, 2013 at 11:36 AM, Loïc Grenié loic.gre...@gmail.com wrote: Hi, these are ANSI escape codes, ANSI escape sequences, ANSI control codes, ANSI control sequences, ... Great, thank you Loïc. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- To

Re: Highlighting CLI output: what are these terms called?

2013-04-17 Thread Bob Proulx
Dotan Cohen wrote: The following page has a nice example of how to highlight text in logfiles: http://www.euperia.com/linux/how-to-highlight-keywords-when-using-tail/903 Here is the example: tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$\e[0m/g' What are the regex replacements in the