nicholas@mordor:~/regex$ nicholas@mordor:~/regex$ cat input.txt a : one b : two c : three d : four a : first b : second c : third d : fourth nicholas@mordor:~/regex$ nicholas@mordor:~/regex$ cat out.txt a,one,b,two,c,three,d,four a,first,b,second,c,third,d,fourth nicholas@mordor:~/regex$ nicholas@mordor:~/regex$ awk '{print $1 "\t\t" $3}' input.txt a one b two c three d four a first b second c third d fourth nicholas@mordor:~/regex$