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.com

#bash#command line#shell#unix#learn

205points
90comments
#158of 2,242 in 2017
Top 8%of 2017 by points

How HN took it

MixedNo clear lean

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 HN
    • I 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
    • I 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 HN
    • challenge "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 HN
    • The 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 HN
    • It 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 HN
    • Yeah 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 HN
    • I 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 HN
    • It 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 HN
    • This 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 HN
    • Super-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
    • I 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
  • 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 HN
    • Super-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

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/13492975)