open all input files, making array of file descriptors open output file for writing while the first input file has remaining lines for each input file descriptor read one line get desired column write to output file write newline to output file close all files