[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: FW: Quickie: how to stop line wrapping when doing a search etc



"Adrian Black" wrote...:
> I am using Redhat 6.2 and I have the annoying problem that when you
> do a ldap search that when a line produced by ldapsearch is above a
> certain charcter length the line is wrapped to the next line with a
> newlineSPACE added. I am using putty as my terminal emulator but I
> don't think that this is the problem. Even if I direct the output
> to a file it stills happens. 
> 
> How do I
> a) stop this

don't specify "-L" option with ldapsearch. note that output will be of 
the form
key=value
instead of
key: value
then. i'm not sure about other side-effects concerning output format 
though.

> b) use a unix tool (vi etc) to remove the added characters.

in vi you may type:

:1,$s/\n //

where ":" is to enter the vi-command-line, "1,$" means from first to 
last line, and "s/\n //" will substitute "a newline followed by a 
space" with nothing.

hth,
daniel