[PlanetCCRMA] grep having problems

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Thu Mar 10 18:32:01 2005


On Thu, 2005-03-10 at 17:04, Mark Knecht wrote:
> Hi,
>    A strange thing has popped up on my Planet machine here:
> 
> [mark@Godzilla mark]$ cat .bash_history | grep ssh
> Binary file (standard input) matches
> [mark@Godzilla mark]$
> 
> It seems that either | or grep doesn't work anymore?
> 
> What might I want to do to fix this?

Strange, I tried the same thing (in fc3) and for some reason
.bash_history is being recognized as a binary file (instead of text). I
would imagine that the "file" command is being used to clasify the input
to grep (see "man file"). Did work in the expected way in rh9.

Anyway, a workaround would be to force grep to treat the file as text
with the "-a" option. 

-- Fernando