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

Re: grep bug?



On Wed, Sep 21, 2005 at 02:20:12PM -0700, Enrique Morfin wrote:
> 
> if:
> 
> $aptitude search kernel-image
> v   kernel-image                                      

snipped
> 
> if:
> $ aptitude search kernel-image|grep 2.6
> p   kernel-image-2.4.27-2-686       - Linux kernel
> image for version 2.4.27 on P
> 
> there are only 80 columns!
> This not happen with "ls -alh" and long filenames

aptitude detects that it is outputting to a pipe, and formats to 80
columns. Without the pipe, it asks the terminal settings.
Try: 
$ aptitude search kernel-image|cat

Frank

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan



Reply to: