by JoshTriplett · 9y ago · 0 comments
You should support bash's double-star wildcard, which works recursively. Several of the challenges that currently require
find -name 'access.log*' -print0 | xargs -0 somecommand
could just use somecommand **/access.log*
instead.You might also encourage people to look up manpages. For instance, someone who doesn't know about "grep -h" may want to look at the manpage for grep. You could make "man grep" link to http://man7.org/linux/man-pages/man1/grep.1.html .
Tab completion doesn't always include all files; for instance, it doesn't include split-me.txt
Have you considered logging all unique successful solutions (filtering out minor whitespace differences) to each challenge? That would let people who have completed each challenge see other potential approaches to the problem, and perhaps learn about new commands.
It depends on what the educational goals are, but alternatively OP could swing on the opposite direction and go with a very vanilla POSIX sh style shell (maybe dash) to discourage bashisms.
I might of course be bit biased because `find` is one of my favorite utils (generally with -exec instead of -print0|xargs -0) and I practically never use newfangled doublestar globbing
This challenge was where I stopped, and for this exact reason. Then again, I am a zsh user, so maybe I'm spoiled...
Which options, specifically?
shopt -s globstar
and **/access.log*
works just it would in bash :)