I have four text files each containing a single field. I want to convert them into a single text file with four fields (one from each file). How can I do this using shell scripting.
This should do:
paste file_1 file_2 file_3 file_4
If you want pretty printing (given that the number of lines are same for all the files), then:
paste 1 2 3 4 | column -t
The paste command does exactly what you're looking for, and the good news is that it's POSIX-standard, so it's available effectively everywhere.