Friday, November 12, 2010

Merge a number of files or file contents

#!/bin/bash
# Script to create a CSV formatted text with a file of a few lines having one entry per line.
# This will merge the files line by line

for i in `cat test`; do echo $i > out/$i.out; done;
paste -d, out/*