Jan 20, 2004 #1 q4s72534 MIS Joined Aug 19, 2003 Messages 59 Location US how do i find blank lines in a file?
Jan 20, 2004 #2 SteveR77 Programmer Joined Sep 18, 2000 Messages 813 Location US To find the blank lines - grep '^$' {File name} If you are looking to strip the blank lines out you will need to use either awk or sed. Steve Upvote 0 Downvote
To find the blank lines - grep '^$' {File name} If you are looking to strip the blank lines out you will need to use either awk or sed. Steve
Jan 20, 2004 #3 dickiebird Programmer Joined Feb 14, 2002 Messages 758 Location GB To remove empty lines : sed '/^$/d' filename > newfilename To remove line(s) with just a space : sed '/^ /d' filename > newfilename Dickie Bird (-))) Upvote 0 Downvote
To remove empty lines : sed '/^$/d' filename > newfilename To remove line(s) with just a space : sed '/^ /d' filename > newfilename Dickie Bird (-)))
Jan 21, 2004 #4 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR One regular expression for blank lines (not necessary empty): Code: /^[ ]*$/ ^__ Tab char Hope This Help PH. Upvote 0 Downvote
One regular expression for blank lines (not necessary empty): Code: /^[ ]*$/ ^__ Tab char Hope This Help PH.