On Mon, 2015-10-05 at 00:16 +0100, John Horne wrote: > > So on your BSD system running: ls -ld /usr/.* | egrep -v '/\.\.?$' > sets RKHTMPVAR to contain the colour codes. That really doesn't make > much sense. > Actually it does make sense, thinking about it a bit more, if the 'ls' or 'egrep' command is setting the colour of the output.
On my Linux PC if I use 'ls --color=always' and either set a variable to the output or pipe the output to a grep/egrep command, the result is coloured output. That is, the variable now contains the colour escape characters. This obviously messes up any piped egrep command. If I use a pipe, or set a variable, and set the ls command to 'ls - -color=auto' then no escape sequences are produced. So I would suspect that either the 'ls' or 'egrep' command are always setting the colour. If, as root, you just run 'ls -ld /usr/.* | cat -vet' do you get coloured output? Also, as root, if you type in 'alias ls' what is the output? And what is the output of 'alias egrep'? I'm still a bit confused though because aliases aren't exported to scripts. John. -- ---------------------------------------------------- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK ------------------------------------------------------------------------------ _______________________________________________ Rkhunter-users mailing list Rkhunter-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rkhunter-users