Dear All,
I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional).
I have multiple tab-delimited files with the following structure:
file1:
1 44
2 56 46
3 90 56 43
4 32 32 23 49
5 43 56 45 34 48
6 35 32 56 41 42 43
7 38 32 23 12 56 32 67
8 78 32 45 45 12 45 45 45
9 23 45 45 34 43 34 12 23 234
10 45 62 56 44 77 54 33 78 890 432
11 12 43 21 34 54 43 56 54 543 546 65
.
.
I have to do the following 2 task with these files:
Task1:
I want to pick up a specific value (based on line and column number) from each file and put it to another file (say Task1.txt). In Task1.txt I have defined that for each file I want the value in what line and what column and the value should be added to the next column of this file.
Task1.txt
FileName lineNumber ColumnNumber value
File1 5 4 45
File2 7 6 ?
File3 10 9 ?
File4 67 55 ?
Task2
For the same files I want to pick up all values of the second column for a range of lines and put them into the Task2.txt file. Here is the Task2.txt file:
Task2.txt
FileName Line-start line-end
File1 4 8 32 43 35 38 78
File2 67 80
File3 345 380
File4 48 54
It will be appreciated if you kindly help me to solve these issues.
Regards