Antwort: Scripting: exclude null lines

From: Peter Wuestefeld (Peter.Wuestefeld@SYSVA.DE)
Date: Fri Jul 18 2003 - 06:54:11 EDT


sed -e "/^$/d" your_file > your_new_file

Peter Wuestefeld M.A.

sysva GmbH - ein Unternehmen der SVA
Niederlassung Stuttgart
Wilhelm-Haas-Straße 6
70771 Leinfelden-Echterdingen

Büro: 0711 758595-40
Fax: 0711 758595-44
Mobil: 0151 12524406
SMTP: Peter.Wuestefeld@sysva.de

Somewhere found on the 'net:
=> Airconditioned. DO NOT open Windows. <=

                      "Green, Simon"
                      <Simon.Green@EU.A An: aix-l@Princeton.EDU
                      LTRIA.COM> Kopie:
                      Gesendet von: IBM Thema: Scripting: exclude null lines
                      AIX Discussion
                      List
                      <aix-l@Princeton.
                      EDU>

                      18.07.2003 12:30
                      Bitte antworten
                      an IBM AIX
                      Discussion List

I have a file containing data lines interspersed with null lines. (These
lines do NOT contain spaces: it's just a new-line character.)

Is there a simple way of excluding those null lines in a Korn-shell script?
I'm sure there ought to be but nothing I've tried has worked, so far.

Simon Green
Altria ITSC Europe Ltd

AIX-L Archive at http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2
AIX FAQ at http://www.faqs.org/faqs/aix-faq/

N.B. Unsolicited email from vendors will not be appreciated.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:02 EDT