3 ms·
The article solves the problem: for which numbers x between 1 and 500 is there no file x_A.csv? It looks like in this case it is equivalent to the easier proble
by omaranto 8y ago
The article solves the problem: for which numbers x between 1 and 500 is there no file x_A.csv? It looks like in this case it is equivalent to the easier problem: for which x_data.csv is there no corresponding x_A.csv?
cd dataset-directory
comm -23 <(ls *_data.csv | sed s/data/A/) <(ls *_A.csv)
- ebeip90 8y agoThis will fail for any filenames that contain newlines
- omaranto 8y agoCorrect. It is intended for the filenames in the article. More generally, I try to write all my shell code to silently produce hard to track down errors when a filename contains newlines, in order to punish me for my carelessness if I ever accidentally create such a filename.