[ILUG] striping file from blank lines
Stephen_Reilly at dell.com
Stephen_Reilly at dell.com
Fri Aug 17 11:53:40 IST 2001
sed '/^$/d' file
will strip blank lines, do you want to strip out lines with only whitespace
in them as well ? If so use something like sed -e '/^$/d' -e '/^[ \t]*$/d'
file
Though I'm not sure if I have that one right off hand ...
Could use grep as well, same patterns but not as much fun.
steve
-----Original Message-----
From: hrishy [mailto:hrishys at yahoo.co.uk]
Sent: 17 August 2001 11:25
To: ilug at linux.ie
Subject: [ILUG] striping file from blank lines
Hello'
could anybody tell me how to strip blank lines from a
file.i dont want to use perl
regards
hrishy
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
--
Irish Linux Users' Group: ilug at linux.ie
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at linux.ie
More information about the ILUG
mailing list