rubysecurity.org

Cloud Architect / DevOps Engineer / SRE / Developer | /root

Home About Books Blog Portfolio Archive
4 October 2014

Perl - Remove all blank lines from a file

by Alpha01

Remove all blank lines from a file using Perl:

perl -ne 'print unless /^\s+$/ ' test.txt 
Tags: [ perl ]