Live data from Hacker News

Twelve Days of Shell

12days.cmdchallenge.com

31–40 of 89 posts

Re: Twelve Days of Shell

#31
Great idea, but a few feedback points:

1. It's difficult to know that it is following from the previous problem, and then on some problems it changes the workspace.

2. It's not always easy to know what it wants.

3. The question about finding a line starting with "The" I successfully cheated:

     cat night-before-christmas.txt | grep "The "
4. Likewise the ending "!":

    cat night-before-christmas.txt | grep "!"
5. On the eighth day I get a "runner error" with the command:

     mv *lve* Workshop
I'm globbing for the filename match, I'm not sure if it's "elve" or "Elve" and then trying to move to the target directory.

Otherwise it's quite fun - the instant feedback is great.

Re: Twelve Days of Shell

#33

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

`grep laugh *` worked for me

Re: Twelve Days of Shell

#34
post #13

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.

Neat. Perhaps it would be even nicer if the "advent" theme was more prominently present, e.g. using the Bible as the target data file to be used. Here's three examples tasks from me: (1) Write an sh script (using only POSIX standard commands) to create a Keywords in Context (KWIC) concordance of the new testament. (2) Write a bash script that uses grep with regular expressions to extracts all literal quotes of what J…

Respectfully, many would find that off-putting. "Advent of X" in tech is entirely decoupled from religion. Keeping it neutral seems to me the "nicest" approach. That said, something like what you described might be a cool exercise for your bible study group. Finally, I appreciated your "incidentally" aside about the origins of philology.

Re: Twelve Days of Shell

#35
post #11

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 I think a beginner could be doing it right but then be told they are wrong as you aren’t evaluating actual commands Best would be to like actually run it* and then check solutions out with awk that it pattern matches * aka give me a shell ok wort…

"ls" shows only visible files whereas "ls -a" also displays those starting with a dot. Given the question doesn't that make your answer the correct one?

Re: Twelve Days of Shell

#36

I've recently reached a point where I feel I've reached an upper limit with how much efficiency I can extract from my usual toolset/editors. So I've gone on a journey where I'm finally exploring tools that make living in the command line a productive and pleasant experience for me. I've long put off learning or even exploring tmux or learning more than a few handful of vim keybinds. So I started digging into configur…

Forget cheatsheets, tweets, videos, books, etc. Vim comes with a very well made built-in tutorial that will gently pull you toward maximum efficiency.

I love vim tutor!

I learnt the basics of vim navigation through it. I'm yet to finish it since I dropped it after the first chapter to start using it as a daily driver and picking things as I need. I will probably come back and go through it again at some point and by then it will be another mind-blown situation

Re: Twelve Days of Shell

#37

Meta: the first day of the Twelve Days of Christmas is Christmas Day (December 25) itself: * https://en.wikipedia.org/wiki/Twelve_Days_of_Christmas The days before the 25th are part of the season of Advent: * https://en.wikipedia.org/wiki/Advent

Too many people I know spend their boxing day packing up their tree. Christmas is over before it's barely begun!

But that's kind of understandable when Christmas begins in September if you believe the retailers.

Re: Twelve Days of Shell

#38

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

`grep laugh *` worked for me

I tried again to see if they fixed it. No it still doesn't work. You'll get the output but look closer.

  Output does not match expected lines - try again
So you can't move on to the next level.

Re: Twelve Days of Shell

#39
I tried to grep for "♫ piping ♫" at some point and the website got stuck. I wonder what it was trying to do...

other than that - nice exercise for newbie shell dabblers :-)

Re: Twelve Days of Shell

#40

Earlier quoted context omitted.

`grep laugh *` worked for me

I tried again to see if they fixed it. No it still doesn't work. You'll get the output but look closer. Output does not match expected lines - try again So you can't move on to the next level.

they must have fixed it. Works for me, including new sessions on separate browser.
Post reply on HN