←back to thread

Twelve Days of Shell

(12days.cmdchallenge.com)
256 points zoidb | 3 comments | | HN request time: 0.02s | source
1. aargh_aargh ◴[] No.46190818[source]
The good: Nice exercises for beginners. Tab-completion, accepts readline characters like ctrl-u.

The bad: You don't see the (wrong) output if you don't get it right the first time, making it hard to work iteratively and having to guess what the question actually intended.

E.g. 'Seven files that start with "Santa"' actually wants file names that start with Santa, after some questions that had you use "grep" to search file contents. Where I actually struggled with what's expected is Day 11.

The ugly: Actually a very nice design.

replies(2): >>46192691 #>>46193784 #
2. Retr0id ◴[] No.46192691[source]
The tab completion sorta works but it seems to be simulated, doesn't understand subdirectories etc.
3. pekim ◴[] No.46193784[source]
> Where I actually struggled with what's expected is Day 11.

Just the lines from the files are wanted, not the files names. It took me a little while to cotton on to that.

Semi-spoiler follows.

So you need to use the appropriate flag with grep to suppress the file names.