less -S:

       -S or --chop-long-lines
              Causes lines longer than the screen width to be  chopped  rather
              than  folded.   That  is, the remainder of a long line is simply
              discarded.  The default is to fold long lines; that is,  display
              the remainder on the next line.


On Tue, 18 Oct 2005, m ike wrote:

> Instead of line wrapping, is there a way to get a command such as
> 'less' to truncate?  My fix at the moment is:
> 
>     function lesstruncated { cat $2 | sed -e "s/\(^.\{1,$1\}\).*/\1/" | less 
> ;}
> 
> for example:
> 
>     lesstruncated 40 filename
> 
> 
> -- 
> [email protected]
> http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
> 


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to