Hacker News Viewer

12 Days of Shell

by zoidb on 12/8/2025, 10:13:07 AM

https://12days.cmdchallenge.com

Comments

by: aargh_aargh

The good: Nice exercises for beginners. Tab-completion, accepts readline characters like ctrl-u.<p>The bad: You don&#x27;t see the (wrong) output if you don&#x27;t get it right the first time, making it hard to work iteratively and having to guess what the question actually intended.<p>E.g. &#x27;Seven files that start with &quot;Santa&quot;&#x27; actually wants <i>file names</i> that start with Santa, after some questions that had you use &quot;grep&quot; to search <i>file contents</i>. Where I actually struggled with what&#x27;s expected is Day 11.<p>The ugly: Actually a very nice design.

12/8/2025, 10:47:07 AM


by: oneeyedpigeon

I think the instructions need more detail. &#x27;Five lines that start with &quot;the&quot;&#x27; doesn&#x27;t scream &#x27;or &quot;The&quot;, or &quot;thE&quot;&#x27; to me...

12/8/2025, 11:41:27 AM


by: blenderob

Looks nice but it&#x27;s rejecting valid commands as incorrect. Like when it told me to search for &quot;laugh&quot; I ran<p><pre><code> grep laugh * </code></pre> There&#x27;s only one file in the directory. So that&#x27;s a correct answer but the game wants me to run<p><pre><code> grep laugh night-before-christmas.txt </code></pre> It&#x27;s like those weird interviewers who have a specific answer in mind and they&#x27;ll accept nothing other than the answer they have in mind.

12/8/2025, 12:18:05 PM


by: bArray

Great idea, but a few feedback points:<p>1. It&#x27;s difficult to know that it is following from the previous problem, and then on some problems it changes the workspace.<p>2. It&#x27;s not always easy to know what it wants.<p>3. The question about finding a line starting with &quot;The&quot; I successfully cheated:<p><pre><code> cat night-before-christmas.txt | grep &quot;The &quot; </code></pre> 4. Likewise the ending &quot;!&quot;:<p><pre><code> cat night-before-christmas.txt | grep &quot;!&quot; </code></pre> 5. On the eighth day I get a &quot;runner error&quot; with the command:<p><pre><code> mv *lve* Workshop </code></pre> I&#x27;m globbing for the filename match, I&#x27;m not sure if it&#x27;s &quot;elve&quot; or &quot;Elve&quot; and then trying to move to the target directory.<p>Otherwise it&#x27;s quite fun - the instant feedback is great.

12/8/2025, 1:06:50 PM


by: arionmiles

I&#x27;ve recently reached a point where I feel I&#x27;ve reached an upper limit with how much efficiency I can extract from my usual toolset&#x2F;editors. So I&#x27;ve gone on a journey where I&#x27;m finally exploring tools that make living in the command line a productive and pleasant experience for me.<p>I&#x27;ve long put off learning or even exploring tmux or learning more than a few handful of vim keybinds. So I started digging into configuring them and learning them well enough to be able to regularly use them for work and personal computers.<p>It&#x27;s been very pleasant, to say the least. There&#x27;s still a few ways I need to go where I do everything from the command line and the keyboard, but I think it&#x27;s worth training your muscles to be comfortable with doing things purely using the keyboard.<p>I&#x27;ve switched to vim mode for a few tools that offer it. I started seriously using vimium on chrome and firefox (a friend had introduced me to it about 7 years ago but I never cared enough to learn it well).<p>Another reason I finally made the jump was that I&#x27;ve been having RSI pain on my right hand due to using mouse too much and in un-ergonomic positions. While I&#x27;ve taken measures to improve ergonomic use of the mouse and keyboard, I&#x27;m just totally impressed with the capabilities of keyboard navigation and how much value you can extract out of your keyboard.<p>My friends have been egging on me about the bell curve meme, but I think it&#x27;s important for me to figure out the limits and then maybe I will finally go back to defaults and simpler tools. The only way to be on the right side of the bell curve is through the middle.

12/8/2025, 10:37:22 AM


by: throw0101d

Meta: the first day of the Twelve Days of Christmas is Christmas Day (December 25) itself:<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Twelve_Days_of_Christmas" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Twelve_Days_of_Christmas</a><p>The days before the 25th are part of the season of Advent:<p>* <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Advent" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Advent</a>

12/8/2025, 1:11:53 PM


by: derrida

Hey this doesn’t work : first solution “ls -al” which I use all the time to list directories was rejected in the second question I used awk and was rejected it expected grep<p>I think a beginner could be doing it right but then be told they are wrong as you aren’t evaluating actual commands<p>Best would be to like actually run it* and then check solutions out with awk that it pattern matches<p>* aka give me a shell ok worth a try lol xD<p>Edit: also I was expecting something a bit more challenging (also that is correct) to like exercise the brain for those of us that use shell (this is hacker news) something that takes a few minutes and isn’t just commands used all the time

12/8/2025, 11:00:25 AM


by: janmatejka

&#x27;Seven files that start with Santa&#x27; is actually about filenames. That&#x27;s pretty confusing especially since users are primed with file contents from the previous exercises already.<p>And from pipers piping description I had no idea what was wanted of me.

12/8/2025, 11:22:18 AM


by: einpoklum

I tried to grep for &quot;♫ piping ♫&quot; at some point and the website got stuck. I wonder what it was trying to do...<p>other than that - nice exercise for newbie shell dabblers :-)

12/8/2025, 1:31:16 PM


by: haolez

The way that worked for me to properly learn shell is to do a non-shell project with it.<p>Like, do a complex background worker for a web server that listens to a socket, does complicated stuff, exports functions (if in Bash), etc.<p>You don&#x27;t have to use it afterwards. The value is in the journey. It&#x27;s fun :)

12/8/2025, 12:32:04 PM


by: FailMore

How would one make a true shell in a website like this one? (As in, is there an open source library to host an interactive shell for educational purposes - eg codecademy)

12/8/2025, 12:35:13 PM


by: sannysanoff

Fluent in shell, but cultural context is more difficult, especially with pipers, had to do guess work.

12/8/2025, 11:48:44 AM


by: beardyw

As a developer I&#x27;ve been through 10 different languages and about the same number of operating systems, and I barely managed to remember any of them, even at the time. And I assume soon using natural language as the main interface will become commonplace, which will finally let me off the hook.<p>I will give this a go, but I doubt any of it will stick!

12/8/2025, 11:17:35 AM


by: Barathkanna

Fun idea. It’s basically an Advent calendar for shell one-liners. Nice way to level up your CLI muscles without diving into full projects.

12/8/2025, 10:21:50 AM


by: benterix

It would be nice if the instructions spelled out what to do, then I could do it. Otherwise I have to guess what author meant. But all in, a nice small exercise, thanks!

12/8/2025, 11:07:04 AM


by: pstoll

Neat idea à la regex golf.<p>But doesn’t seem to do enough shell escaping or correctly. Also seems underspecified, ie “find 5 lines starting with ‘the” doesn’t require a pipe to head -5.

12/8/2025, 10:45:46 AM


by: sva_

Cool idea but very opinionated and no room for variation

12/8/2025, 11:47:34 AM


by: ParadisoShlee

I assumed this was some kind of hacking challenge.

12/8/2025, 11:29:34 AM


by: franticgecko3

Tab complete is completely broken on Firefox mobile (Android)

12/8/2025, 10:54:04 AM


by: bluecalm

It looks very nice. One problem I&#x27;ve encountered is that when you make a mistake then the name of the file you have to use disappears and it&#x27;s impossible to get it back. What is this website created with btw? I like the style a lot.

12/8/2025, 10:51:20 AM


by: skinwill

Viewing the page with Safari 26.1 the questions stopped showing up after the second challenge. I was left with only Learn and View Solutions, which was not very fun since both showed a form of the answer.<p>TL;DR: The page stopped loading properly.

12/8/2025, 10:52:10 AM


by: dncornholio

Terrible. You cannot &#x27;ls&#x27; if ls is not the right answer. Completely useless.

12/8/2025, 12:16:49 PM