←back to thread

Twelve Days of Shell

(12days.cmdchallenge.com)
256 points zoidb | 3 comments | | HN request time: 0.001s | source
Show context
derrida ◴[] No.46190909[source]
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

replies(3): >>46191847 #>>46192742 #>>46194940 #
Retr0id ◴[] No.46192742[source]
It does seem to actually run the submitted commands, and awk is there.
replies(1): >>46193338 #
1. derrida ◴[] No.46193338[source]
Second question

> awk '/^laugh/ { print $0 }' night-before-christmas.txt

replies(1): >>46193442 #
2. aidenn0 ◴[] No.46193442[source]
Get rid of the caret and it works; it wants lines with laugh, not lines that start with laugh,
replies(1): >>46241042 #
3. derrida ◴[] No.46241042[source]
Ah cheers thanks, my stupid! (And what's worse - wasted some others attention and even thought what someone took time to create was at fault!) However thankful for kind directness there.