onlyforbopi
3/10/2017 - 9:17 AM

AWK - LINE SPACING

AWK - LINE SPACING

awk '{ print; print "\n" }'						

#ex
awk '{ print; print "\n" }' FILE_IN FILE_OT	
awk '1; { print "\n" }'						



#ex
awk '1; { print "\n" }'	FILE_IN > FILE_OT
awk '{ print; print "\n\n\n" }'


#ex
awk '{ print; print "\n\n\n" }' FILE_IN > FILE_OT						

awk 'NF { print $0 "\n" }'						

#ex
awk 'NF { print $0 "\n" }' FILE_IN > FILE_OT

awk 'BEGIN { ORS="\n\n" }; 1'						


#ex
awk 'BEGIN { ORS="\n\n" }; 1' FILE_IN > FILE_OT						
awk '1; { print "" }'						

#ex

awk '1; { print "" }'	FILE_IN > FILE_OT
1. awkdoublespace                       :  Double Space a File
2. awkdoublespacev2                     :  Double Space a file v2
3. awknomorethanoneblank                :  Double Space a file, no more than one blank line
4. awktriplespace                       :  Triple Space a File
5. awktriplespacev2                     :  Triple Space a file, v2
6. awknspace                            :  N-Line space a file