5 ms·
Show HN: Twelve Days of Shell
- Zhyl 6y agoThese are like a Christmas themed bash koans. I love it.
- SwiftyBug 6y agoVery nice and very educational! I'm kind of ashamed to learn only now that I can move a file without having to explicitly specify the destination file name.
- zoidb 6y agothanks! glad you enjoyed it. I had some downtime last weekend so thought I would create a Christmas edition of an old project https://cmdchallenge.com https://cmdchallenge.com. It's a little bit more gentle of an introduction to shell than the main site.
- CGamesPlay 6y agoHeh, I somehow crashed the server with `grep -ie '^the' night-....`, and the error message appeared to be cached, so I had to go with `grep -ei '^the.' night-...`. Then I tried a `ls /proc` and got a rate limiting error. I think I'm not in the target audience, but it's cute!
- mxuribe 6y agoThese were quite fun!
- throw0101a 6y agoMeta: The twelve days start on Christmas Day (25th): * https://en.wikipedia.org/wiki/Twelve_Days_of_Christmas https://en.wikipedia.org/wiki/Twelve_Days_of_Christmas The time period before-hand is Advent (from the Latin to come): * https://en.wikipedia.org/wiki/Advent https://en.wikipedia.org/wiki/Advent
- pc86 6y agoLove it. I never knew ls took arguments! Shows how much time I spend in the terminal :)
- Delk 6y agoKind of fun, although to me there seems to be a bit too much guesswork as to what you're actually supposed to do. For example the puzzle for day 8 (and especially day 9) doesn't really tell me anything about what I'm actually supposed to achieve, and clicking "learn" to find it out actually gives the solution outright.
- zoidb 6y agogood point, I will add a hint to #8
- cashewchoo 6y agoI had fun. These are a great, gentle intro to powerful tools. One recommendation: Add a "What?" accordion entry that just states in plain speech what exactly you want done, without giving away the how. For a few of these I read the prompt and was like "uh..." then clicked learn and was like "oh all they want is find -type f". Also, small nit, "find ./place-for-pipers -type f -name "piper" | xargs grep -i 'piping'" wasn't accepted due to the filenames being prefixed to the output. I feel like this is one of the benefits of piping it all through a single grep (grep, knowing the context of multiple input files, gives you useful output). Obviously you can massage both solutions to give the others' text output, but I just felt a little cheated that my response wasn't marked correct.
- zoidb 6y agoThanks for the feedback! > One recommendation: Add a "What?" accordion entry that just states in plain speech what exactly you want done, without giving away the how. For a few of these I read the prompt and was like "uh..." then clicked learn and was like "oh all they want is find -type f". Yeah this is a common complaint, because either the "learn" section gives away too much. I think I will just add more hints underneath the challenge like I did recently for #8 https://12days.testing.cmdchallenge.com/#/12days_8 https://12days.testing.cmdchallenge.com/#/12days_8
- zoidb 6y ago> Also, small nit, "find ./place-for-pipers -type f -name "piper" | xargs grep -i 'piping'" wasn't accepted due to the filenames being prefixed to the output. I feel like this is one of the benefits of piping it all through a single grep (grep, knowing the context of multiple input files, gives you useful output). Obviously you can massage both solutions to give the others' text output, but I just felt a little cheated that my response wasn't marked correct. Hm, yeah we can probably just search for the filenames and ignore everything else to make it a little more forgiving.
- ecliptik 6y agoyou can add -h to grep, which won't print the filenames (this is what I did an it accepted the answer).
- Freak_NL 6y agoUnable to process command - got response: {"message":"Internal Server Error"} Heh. \ is not a valid entry.
- zoidb 6y agoyeah i saw a lot of those errors :( it calls a lexical parser on the input which doesn't like it.
- aardvarkr 6y agoThere seems to be a bug on mobile safari for iPhone. I can’t type more than one word so can’t progress past the grep command on 2
- xondono 6y agoSame here, I’ll try later from PC, it’s a nice idea.
- actionscripted 6y agoLove it. I do think that the "learn" section should always be open. For me (FF) after the first challenge it's closed by default which leaves just a command line and no clear direction.
- ktm5j 6y agoFun! But I think I found a bug: If you hit enter without any input then it crashes and pegs a CPU core at 100% (in firefox on Linux).
- tambourine_man 6y agoDoesn't work in Safari 13.0.2 SyntaxError: Invalid character '\ud801'
- tus88 6y ago"Javascript is required". Right...
- myroon5 6y agoWish history of previous commands and output were kept like a standard shell to scroll through and copy-paste things
- boogies 6y ago^P and ^R both work