I have 30 files which every file has the same data structure, but for different observations. I want to extract the each file's first 4 columns data and then output each file's result into a new file. Therefore, I will have another 30 files which every file only contains original file's first 4 columns data.
I used the command line in Ubuntu. I used the following code, but I only got all outputs into a single file.
awk '{print $1, $2, $3, $4}' File_*.txt > Part_File.txt ##I use the * to represent 01 to 30.
Could anyone help me? Thanks in advance.