3 ms·
given the limited scope of files in the direcctory... not sure why it was necessary to use grep, instead of the built in glob? ls dataset-directory | egrep '
by LogicX 8y ago
given the limited scope of files in the direcctory... not sure why it was necessary to use grep, instead of the built in glob?
ls dataset-directory | egrep '\d\d\d\d_A.csv'
which FWIW wouldn't even work, on multiple levels: you need -1 on ls and no files end with A.csv
vs
ls -1 dataset-directory/*_A?.csv
ref: http://man7.org/linux/man-pages/man7/glob.7.html http://man7.org/linux/man-pages/man7/glob.7.html
Update: apologies, apparently my client cached an older version of this page. at that time the files were named A1.csv and A2.csv
- deleted 8y ago[deleted]
- olog-hai 8y agoSome ls man pages state the following about the -1 option: "This is the default when the output is not directed to a terminal." I've never needed to use -1 when piping ls's output to another command.