Live data from Hacker News

Twelve Days of Shell

12days.cmdchallenge.com

11–20 of 89 posts

Re: Twelve Days of Shell

#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 worth a try lol xD

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

Re: Twelve Days of Shell

#12
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!

Re: Twelve Days of Shell

#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 Jesus said in the New Testament. [Incidentally, doing this task manually marked the beginnings of philology and later automating it marked the beginning of what was later called literary and linguistic computing, corpus linguistics, computational linguistics, and digital humanities.]

(3) How many times is Jesus mentioned by each of the four accounts of his life (Matthew, Mark, Luke, and John)?

(You may begin by extracting the New Testament from the end of the Bible with a grep command.)

Dataset: https://openbible.com/textfiles/kjv.txt

Re: Twelve Days of Shell

#14
As a developer I'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.

I will give this a go, but I doubt any of it will stick!

Re: Twelve Days of Shell

#15
post #14

As a developer I'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. I will give this a go, but I doubt any of it will stick!

Shell quotes is the last frontier LLM's seem to keep getting wrong. Esp when it's Github CI yaml which needs to ssh somewhere and run command running another command there. Needs AGI apparrently.

Re: Twelve Days of Shell

#16
'Seven files that start with Santa' is actually about filenames. That's pretty confusing especially since users are primed with file contents from the previous exercises already.

And from pipers piping description I had no idea what was wanted of me.

Re: Twelve Days of Shell

#19
post #5

Neat idea à la regex golf. 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.

> find 5 lines

Especially since the previous two questions used head/tail. IMO, the wording would be better as "find all the lines" since that's what the command does.

Post reply on HN