September 2, 2014

Splitting a File Elegantly

In a previous Linux Rain article I compared different ways to delete blank lines, and showed that the AWK way was the simplest and most thorough. Here I show how to split a text file into multiple text files using a surprisingly simple AWK command.

Background

In 2013 I published an article in Free Software Magazine about finding changes in a sorted list. The example I used is shown below. It's a made-up name/address/phone-number file called names, with comma-separated fields.

Read more at TheLinuxRain.
Click Here!