Command Line Challenge
Learning and science
shell command practice
SHOW HN2017
Command Line Challenge
This was a small side project I completed recently, would love to hear feedback.
cmdchallenge.comHow HN took it
10 positive, 31 neutral or asking, 2 mixed, 24 critical, out of 67 comments about the project. Thread score -0.23.
Execution: 2 for, 17 againstIdea: 4 for, 0 againstPerformance: 0 for, 3 againstDesign: 0 for, 2 againstDocs: 0 for, 2 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Fun and educational for learning command line tricks
From 3 comments
This is a really fun idea, and I enjoyed going thru it. I like the fact that it doesn't matter how you get the answer, as long as it's right (seq 100 | tr '\n' ' '). This would…
ianmcgowan on HNI really enjoyed this, it was a nice way to practice/learn some command line tricks. In particular I got better acquainted with the find command. Nice work! My only suggestion…
cglouch on HNI like this a lot, thanks for putting together. Definitely made me think hard about how much of the command line I actually know.
the_watcher on HN
Objections
Some challenge wording is ambiguous and answers rejected unfairly
From 3 comments
I guess my point is that "ls" shouldn't be an answer. Typically it will print out multiple files on a line. If it's just checking for output and not the actual command someone…
garettmd on HNchallenge "just the files" description says "Print all files in the current directory". You mean "print the names of all files ..." Lots of the challenges have awkward/ambiguous…
arantius on HNThe description for remove_duplicate_lines needs some clarification, because as written it sounds like either "uniq" or "uniq -u". You should explicitly say that you want the…
JoshTriplett on HN
Shell differs from real bash, e.g. glob and history expansion, output format
From 3 comments
``` bash(0)> grep GET !$ + grep GET '!$' grep: !$: No such file or directory ``` Mmm. Fake bash.
joelthelion on HNIt doesn't handle glob expansion. ``` bash(0)> awk '{print $1}' access.log* + awk '{print $1}' 'access.log*' awk: cannot open access.log* (No such file or directory) ```
glandium on HNYeah it's particular about the output that it expects.
zoidb on HN
Intermittent Internal Server Errors and shared state issues
From 3 comments
``` bash(0)> pwd Internal Server Error ```
_kst_ on HNI got stuck on this one too. Strangely "find . -delete" worked fine. I'm getting Internal Server Error" now, so perhaps a victim of it's own popularity?
ianmcgowan on HNIt looks a bit like the cwd is shared between multiple users accessing the site? I suddenly got errors that access.log disappears, after which my pwd seemed to randomly change.
wichert on HN
Requests
Hints for beginners
From 2 comments
It would be nice to have to have some sort of hints for beginners. Hint 1: tells you command, Hint 2: tells which options/flags you might need, Hint 3: shows (a) solution
ivan_ah on HNThis is really cool, good work! As others have mentioned, hints/etc would definitely be helpful for beginners. I want to post this in our work chat for the less Unix oriented…
notheguyouthink on HN
Show other users' or reference solutions after solving
From 3 comments
After completing the challenges (only had to lookup references on bash parameter expansion and how to read lines without parsing them), I would say that it might be helpful to…
inetknght on HNSuper-cool! Some pieces of feedback: 1) It would be nice to have something special happen when you solve all the puzzles, rather than going back to the first. Some javascript…
ianmcgowan on HNI really enjoyed this, it was a nice way to practice/learn some command line tricks. In particular I got better acquainted with the find command. Nice work! My only suggestion…
cglouch on HN
Tab completion
From 1 comment
Fun! Needs tab-complete.
johnloeber on HN
Message or reward when all challenges are finished
From 2 comments
The finale was weird for me, kinda anticlimactic (back to "hello world"); is that how it's expected to behave? No "finished" message or something? Or is my NoScript interfering…
akavel on HNSuper-cool! Some pieces of feedback: 1) It would be nice to have something special happen when you solve all the puzzles, rather than going back to the first. Some javascript…
ianmcgowan on HN
Questions
Why does a particular grep or find option fail the check
From 2 comments
I stopped after 'Print the relative file paths, one path per line for all files that start with "access.log" in the current directory.' It didn't like my BSD find options.
Snowe on HN``` grep -rl 500 . ``` wasn't accepted. Am I wrong or is it wrong?
coherentpony on HN