View Single Post
  #3   (View Single Post)  
Old 6th January 2013
Mike-Sanders Mike-Sanders is offline
Fdisk Soldier
 
Join Date: Dec 2012
Posts: 52
Default

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)
Reply With Quote