Grep
Kenneth E. Lussier
ken.lussier at zuken.com
Thu Jan 30 11:24:00 EST 2003
I apologize. I mis-spoke my intent. I don't actually want to remove
*ALL* of the blank lines, since that would create a single, really long
entry. There has to be one blank line between each entry. Right now, I
have blank lines within the entries.
It should look like this:
dn: uid=joe at zuken.com, ou=country, ou=contacts, ou=people,
dc=zuken,dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
givenName: Joe
sn: Shmoe
cn: Joe Shmoe
mail: joe at zuken.com
telephoneNumber: 555-555-1212
But currently, it looks like this:
dn: uid=joe at zuken.com, ou=country, ou=contacts, ou=people,
dc=zuken,dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
givenName: Joe
sn: Shmoe
cn: Joe Shmoe
mail: joe at zuken.com
telephoneNumber: 555-555-1212
I need to remove the blank lines before "givenName" and
"telephoneNumber".
Thanks,
Kenny
On Thu, 2003-01-30 at 11:05, Kevin D. Clark wrote:
>
> "Kenneth E. Lussier" <ken.lussier at zuken.com> writes:
>
> > 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).
>
> This should do the trick:
>
> grep -v '^[ \t]*$'
>
> Regards,
>
> --kevin
> --
> Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
> cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
> alumni.unh.edu!kdc
>
--
----------------------------------------------------------------------------
"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