i have a text file that contain output results of a function(path line and just below the results) and i want to copy only the results, mentioned below of each path line to the file that is mentioned in name=.... and want to paste at the last column of the file
my data is here saved in list.txt
<_io.TextIOWrapper name='/home/liu/datalist/20180603_190202_5.0_38_CD.txt' mode='r' encoding='UTF-8'>
0.9821305886510053
0.9822639336394542
0.9820650754926169
0.9826369946635649
0.983048680372995
<_io.TextIOWrapper name='/home/liu/datalist/20150603_190202_12.0_36_CD.txt' mode='r' encoding='UTF-8'>
0.984263067046808
0.9821305886510053
0.9822639336394542
0.9820650754926169
0.9826369946635649
0.983048680372995
<_io.TextIOWrapper name='/home/liu/datalist/20120603_190202_9.0_35_CD.txt' mode='r' encoding='UTF-8'>
0.984263067046808
0.982871209110385
0.9830143471771022
0.9860952410409616
0.9897257569597108
<_io.TextIOWrapper name='/home/liu/datalist/20100603_190202_125.0_36_CD.txt' mode='r' encoding='UTF-8'>
0.9860794488788789
0.9838808626335948
0.9829656043793615
0.9868238026934462
0.9972756725839034
0.9882482212913676
<_io.TextIOWrapper name='/home/liu/datalist/20240603_190202_265.0_36_CD.txt' mode='r' encoding='UTF-8'>
0.9856758910581078
0.9849158515561436
0.9838016078370099
0.9854127382758501
0.9880763165814402
i tried the code below: not getting proper idea to do this.Hope some expert would help me.Thanks
#!/bin/sh
for file in `list.txt`
cp cat|list.txt > name
Details explanation: suppose we take 20180603_190202_5.0_38_CD.txt file to the consideration.This named file is already present inside /home/liu/datalist directory and it contains file like
1 2 3 4 5
5 6 7 8 9
3 4 5 6 7
3 4 5 6 7
4 5 6 7 8
and i want the file to be as below
1 2 3 4 5 0.9821305886510053
5 6 7 8 9 0.9822639336394542
3 4 5 6 7 0.9820650754926169
3 4 5 6 7 0.9826369946635649
4 5 6 7 8 0.983048680372995