less with color

rouvas at mm.di.uoa.gr rouvas at mm.di.uoa.gr
Tue Nov 22 12:25:08 EET 2011


Dimitrios P. Bouras wrote:
> 2011/11/22 Antonis Christofides <anthony at itia.ntua.gr>
>
>> Όταν λέω grep foo bar, τότε το grep χρωματίζει τη λέξη foo στο output.
>> Όταν όμως λέω grep foo bar|less, χάνω τα χρώματα. Πώς γίνεται να μην τα
>> χάσω;
>
>
> grep --color=always foo bar | less

Thes na peis:

grep --color=always foo bar | less -r

Allios bgainoun ta ANSI escape sequences gia ta xromata.
Bebaia, den ksero kata poso to "-r" einai sinolika kali idea gia to less.
Apo tin alli, sto psaksimo to less kanei highlight apo mono tou to search
string, giati prepei na pareis to xroma apo to grep;

-Stathis

>
> D.
>
> --
> linux-greek-users mailing list -- http://lists.hellug.gr




More information about the Linux-greek-users mailing list