by kritixilithos · 7y ago · 0 comments
Given a sorted list of these files (through `ls` or otherwise) the following sed code will print out the data files for which A did not succeed on them.
/data/!N
/A/d
P;D
This works on the fact that there exists a data file for all successful and unsuccessful runs on data, so sed simply prints the files for which there does not exist an `A` counterpart.If you want to only print out the numbers, you can add a substitution or two towards the end.
/data/!N
/A/d
s/^0*\|_.*//g;P;D
Edit: fixed the sed program /A/{N;d;}
So all together this gives the following ls|sed '/A/{N;d;}'