Menu

Close
  • Home
  • Solutions Log
  • About
  • Search
Subscribe
☰Menu

Strip empty (null) lines from a file

#text processing #sed

sed meets the need; the recipe follows:

sed '/^$/d' filename

Dan Reiland

Operations Engineer

Minneapolis, Minnesota https://unixsherpa.com

Share this solution

Twitter Facebook Pinterest Google+
UnixSherpa All rights reserved - 2023