Grep

Kenneth E. Lussier ken.lussier at zuken.com
Thu Jan 30 10:53:13 EST 2003


Hi All,

This is a fairly simple grep question, I just can't remember how I have
done this in the past. First, a little background:  I have an ldif file
that I exported from Netscape Mail, and I want to import it into an LDAP
server. However, I had to remove some lines because they aren't correct
attributes. So now, I have empty lines in each entry. What I need to do
is remove all of the blank lines (or, more specifically, all of the
lines that have no text on them). I thought that I could do something
like:

'grep -E ^dn -A 10 -w filename'

to grab the lines that start with dn and the 10 lines after and ignore
blank lines. That didn't work. Can someone please smack me with a
clue-stick?

TIA,
Kenny

-- 
----------------------------------------------------------------------------
"Tact is just *not* saying true stuff" -- Cordelia Chase

Kenneth E. Lussier
Sr. Systems Administrator
Zuken, USA
PGP KeyID CB254DD0 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xCB254DD0





More information about the gnhlug-discuss mailing list