Input file:
Desired output file:
Hints:
1. Ascending the data and result naming from 1-(total number of different data)
eg. my input file have total 60 different data in this case
data21_a0_result1,data23_a1_result1,data43_a0_result1,data43_a1_result1,data43_a0_result3,data3_c1_r esult1...data9_c1_result1
(total got around 90 records but only 60 different data name such as data21,data23,data9,etc)
2. Keep those same data with new data naming
eg.
data43_a0_result1 data43_a1_result1 data43_a0_result3
all change to
data3_result1 data3_result2 data3_result3
3. Print out the data and result record only. Excluded those a0,a1,a0,etc.
Command that I tried:
The command I tried fail to generate desired output result.
Thanks bartus11, your awk code worked perfectly
Do you mind to explain why "a[$1]" will let the awk code recalculate each result from 1 once data is different?
Many thanks for advice.
Input file:
A_69510335_ASD>aw 1199470 USA
A_119571157_C>awe,QWEQE 113932840 USA
C_34646666_qwe>TAWTT,G,TT 112736796 UK
C_69510335_QW>T 1199470 USA
D_70520237_WR>QEE,G 34459863 UK
D_71380003_QWR>T 145418226 IK
.
Desired output:
A_69510335_ASD>aw 1199470 USA... (1 Reply)
Format of one input file:
# >length=1
seq program data 909 1992
seq program record 909 1190
Desired output result:
# >length=1
length=1 program data 909 1992
length=1 program record 909 1190
I wanna to replace all the column 1 content (exclude the content start with "#") with the... (5 Replies)
I have a spreadsheet in a folder that looks like this:
Sector1...Sector2...Sector3...Sector4...Sector5...Sector6...Sector7
SomeID....Title.......SomeID...SomeID....SomeID...SomeID....SomeID
OtherID...MyTitle....SomeID...SomeID....SomeID...SomeID....SomeID... (7 Replies)
My input:
Data name: ABC001
Data length: 1000
Detail info
Data Direction Start_time End_time Length
1 forward 10 100 90
1 forward 15 200 185
2 reverse 50 500 450
Data name: XFG110
Data length: 100
Detail info
Data Direction Start_time End_time Length
1 forward 50 100 50 ... (11 Replies)
Hi ,
I want to rename multiple files with their first line bar the first character + the extension .qual. For the example below the filename should read
7180000000987.qual. I have trawled through different threads for 2 days and I don't seem to find anything I can adopt for this task :confused:
... (7 Replies)