Thread
:
Deleting whitespace from otherwise blank lines
View Single Post
#
3
(View Single Post)
6th January 2013
Mike-Sanders
Fdisk Soldier
Join Date: Dec 2012
Posts: 52
Yet another, using the [:space:] POSIX character class:
Code:
sed 's/^[[:space:]]*$//g' file.in > file.out
[:space:] (whitespace) = [ \t\r\n\v\f]
__________________
www.tacoshack.xyz
Last edited by Mike-Sanders; 7th January 2013 at
03:58 AM
. Reason: fixed really bad typo... (palm/face)
Mike-Sanders
View Public Profile
Visit Mike-Sanders's homepage!
Find all posts by Mike-Sanders