Sponsored Content
Top Forums Shell Programming and Scripting useless line feeds in ldapsearch output. Howto remove with shell script? Post 302592778 by robsonde on Tuesday 24th of January 2012 09:19:01 PM
Old 01-24-2012
you can use some perl to fix the long line issue.
Re: ldapsearch result breaks the long dn's in seperate lines

personally i use the netscape SDK, and this has a -T option.

as for the blank lines, if your only returning the DN, then grep the output for the DN.


in the netscape world i use this kind of thing...
Code:
./ldapsearch -1 -T -D "cn=directory manager" -w password uid=blarg dn | grep "^dn:"

---------- Post updated at 03:19 PM ---------- Previous update was at 03:18 PM ----------

you can use some perl to fix the long line issue.
Re: ldapsearch result breaks the long dn's in seperate lines

personally i use the netscape SDK, and this has a -T option.

as for the blank lines, if your only returning the DN, then grep the output for the DN.


in the netscape world i use this kind of thing...
Code:
./ldapsearch -1 -T -D "cn=directory manager" -w password uid=blarg dn | grep "^dn:"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove line feeds

Hi, I have a fixed width flat file which has 1 as the first char and E as the last character. Some of the records have a carriage return /line feeds . how do I remove them? Let me know. Thanks VSK (8 Replies)
Discussion started by: vsk
8 Replies

2. Shell Programming and Scripting

How to remove line from crontab in shell script?

Hi folks, I need to write a rollback script which removes the following line from the crontab: 0 0 * * * su - orca -c "/home/orca/core-<SCHEMA_NAME>/cleanup/CLI/cleanup_BRMS.ksh -c OC4J_RiGHTv_<SCHEMA_NAME>" <SCHEMA_NAME> is parameter. How to do it in ksh? Maybe it's better to backup the... (2 Replies)
Discussion started by: nir_s
2 Replies

3. News, Links, Events and Announcements

HOWTO: RSS Feeds for UNIX Forums

If you want to submit your favorite UNIX.COM forum to RSS news feeds registries or directories, here is how: The top level RSS link to the UNIX forums is: https://www.unix.com/external.php This is the default for the RSS type, which is: https://www.unix.com/external.php?type=RSS ... (11 Replies)
Discussion started by: Neo
11 Replies

4. Shell Programming and Scripting

shell script to remove all lines from a file before a line starting with pattern

hi,, i hav a file with many lines.i need to remove all lines before a line begginning with a specific pattern from the file because these lines are not required. Can u help me out with either a perl script or shell script example:- if file initially contains lines: a b c d .1.2 d e f... (2 Replies)
Discussion started by: raksha.s
2 Replies

5. Shell Programming and Scripting

Howto return the single penultimate line from my output

Hi All I have what seems to be something quite trivial but for the life of me can't work out a solution. Basically, I have the following script that reads a version report that contains certain flags. If a condition is true, I want to print the value of column 2, sort them uniquely and return... (2 Replies)
Discussion started by: kingpin2502
2 Replies

6. Shell Programming and Scripting

howto place in one line output from two functions

Hi I would like to place in one line output from two functions. Both functions return text with print cmd. When I place above code in script it will place them in series. e.g. 1 #/bin/ksh 2 3 function1() 4 { 5 print "My name is" 6 ... (3 Replies)
Discussion started by: presul
3 Replies

7. Shell Programming and Scripting

How to remove particular line from file through shell script?

Hi, I am pasring a file line by line. I need to check each field in line and remove particular line. input file lines are, 02;ABC;PQR 03;aaa;rrr 04;ABC;ggg 09;eee;ABC 04;lmn;stu I am looking for line containing "ABC" as field value. Now How can I remove this line from input file... (7 Replies)
Discussion started by: Poonamol
7 Replies

8. Shell Programming and Scripting

remove line feeds followed by character

Hi everyone, I'm very new to using sed, run through some tutorials and everything but I've hit a problem that I'm unable to solve by myself. I need to remove all linefeeds that are followed by a particular character (in this case a semicolon). So basically, all lines starting with a semicolon... (5 Replies)
Discussion started by: fluffdasheep
5 Replies

9. Shell Programming and Scripting

Remove line breaks in csv file using shell script

Hi All, I've a csv file in which the record is getting break into 1 line or more than one line. I want to combine those splits into one line and remove the unwanted character existing in the record i.e. double quote symbol ("). The line gets break only when the record contains double... (4 Replies)
Discussion started by: rajak.net
4 Replies

10. Shell Programming and Scripting

Remove Space and blank line from file in UNIX shell script

I have below file. I want to remove space at begining of every line and then after also remove blank line from file. I use below code for each operation. sed -e 's/^*//' < check.txt > check1.txt sed '/^\s*$/d' < check1.txt > check2.txt above code not remove all the space... (12 Replies)
Discussion started by: Mohin Jain
12 Replies
hman(1) 						      General Commands Manual							   hman(1)

NAME
hman - browse the on-line manual pages SYNOPSIS
hman [ -P browser ] [ -H host ] [ section ] name hman [ -P browser ] [ -H host ] [ section ] [ index ] DESCRIPTION
The hman script is an interface to man2html(1) that allows you to enter man page requests at the command line and view the output in your favourite browser. The behaviour reminds of that of man(1) so that many people will be able to alias hman to man. If the browser used is netscape, and an incarnation of netscape is running already, hman will pass the request to the existing browser. OPTIONS
-P browser Specify which browser (like lynx, xmosaic, arena, chimera, netscape, amaya, ...) to use. This option overrides the MANHTMLPAGER environment variable. The default is the non-httpd version of lynx, or sensible-browser if lynx cannot be found. -H host Specify from what host to get the man pages. This option overrides the MANHTMLHOST environment variable. The default is localhost. ENVIRONMENT
MANHTMLPAGER The default browser to use is selected using this environment variable. MANHTMLHOST The default host to use is selected using this environment variable. SEE ALSO
man(1), man2html(1), arena(1), lynx(1), sensible-browser(1), netscape(1), xmosaic(1), glimpse(1) http://www.mcom.com/newsref/std/x-remote.html 19 January 1998 hman(1)
All times are GMT -4. The time now is 04:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy