[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to read log files

>>> xgrep () { grep -i "$1" $(echo $PATH | tr ":" " ") ; }
>> Nice. I'm having a hard time understanding that last one, but I will
>> figure it out. Thanks!
> It looks like it takes the PATH environment variable and splits it into
> multiple tokens (directories), and grep will search in *every* directory
> included in PATH.

Without understanding the bash, that is exactly what I had suspected.
The $PATH variable and the : character is what gave it away.


Dotan Cohen


Reply to: