by alayne · 12y ago · 0 comments
In C, readdir returns a perfectly usable struct dirent * with no parsing issues to worry about.
Python also provides a usable Unix layer for automation.
ls pj* | wc -l
Which normally returns the number of pj* files, but will fail for pathological file names as the submission points out.Also, if you're creating filenames with newline and escape chars - well, good luck with that.