I have exactly 100 text files with extension .txt. The files contain numbers like this:
1.txt
I want to extract all the second columns from all 100 files and store in 1 single file. But this has to be done sequentially starting from 1 to 100 not in any order.
But also after extracting after one file, I need 2 newlines in the resulting file so that I may know where the first file ends and the second one starts. Like this
output_file.dat
The above output shows that after 1.txt has been extracted, I print two newlines before starting with 2.txt and keep going so on.
I know how to extract the second columns using this
But I am not able to run it for 100 files. I am using Linux with BASH.
First I'd like to apologize if I opened a thread which is already open somewhere.
I did a bit of searching but could quite find what I was looking for, so I will try to explaing what I need.
I'm writing a script on our server, got to a point where I have two files with results. Example:
File1... (6 Replies)
Hi,
I have a file that has inconsistently numbered columns.
Like row1 has 23 columns, and row 2 has 34 columns etc.
I would like to re-order the first 8 columns as required and from the 9th column till the end, I would like to print it as it is.
I tried to read the re-ordered 8 columns... (7 Replies)
I have two text files where the first three columns are exactly the same. I want to compare the fourth column of the text files and if the values are different, print that row into a new output file. How do I go about doing that?
File 1:
100 rs3794811 0.01 0.3434
100 rs8066551 0.01... (8 Replies)
Dear All,
I'm using autosys in my production system.
My concern is as follows:
autosys -j <some_job_nm>
Output:
Job Name Last Start Last End ST Run Pri/Xit
... (1 Reply)
Dear Gurus,
I am very new to UNIX. I appreciate your help to manage my files.
I have 16 files with equal number of columns in it. Each file has 9 columns separated by space. I need to compare the values in the second column of first file and obtain the corresponding value in the 9th column... (12 Replies)
Hi guys,
I'm rather new at using UNIX based systems, and when it comes to scripting etc I'm even newer.
I have two files which i need to compare.
file1: (some random ID's)
451245
451288
136588
784522
file2: (random ID's + e-mail assigned to ID)
123888 xc@xc.com
451245 ... (21 Replies)
Hello all. I have a problem that I need help solving.
I would like to convert the following file:
human pool1_12 10e-02 45 67
human pool1_1899 10e-01 45 29
human pool1_1829 10e-01 43 26
horse pool1_343 10e-20 65 191
horse pool1_454 10e-09 44 43... (5 Replies)
Hi,
I have a file that looks like this:
s6 98
s6 91
s6 56
s5 32
s5 10
s5 4
So what I want to do is print only the highest value for each value in the column:
So the file will look like this:
s6 98
s5 32
Thanks (4 Replies)