Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sed/awk to double space file

Tags:

sed

awk

I have a file with blank lines and I need to double space the lines in the file. Meaning I need a blank line between two lines with text in it. Can you show me an easy way to do it with awk and/or sed

like image 848
user294280 Avatar asked Jul 01 '11 01:07

user294280


1 Answers

Try this

sed '/^$/d' fileName | sed G
like image 167
Sai Avatar answered Oct 04 '22 21:10

Sai