Live data from Hacker News

Show HN: Oops I deleted my bin/ dir

oops.cmdchallenge.com

1–10 of 23 posts

Re: Show HN: Oops I deleted my bin/ dir

#5
Very cool! I was a bit confused with the marking criteria. For example, my solution for "list all files on one line" appears to work correctly but is said to be incorrect.

    shopt -s dotglob; for i in *; do echo -n "$i "; done
EDIT: I now see that the correct answer is simply "`echo *`". Despite having a dotfile in the directory, it should not be shown.

Re: Show HN: Oops I deleted my bin/ dir

#6
post #4

Great fun! As a non-native speaker, I was confused by the "Print its contents" exercise. I tried things involving /dev/lpr.

thanks for the feedback, maybe something like "display its contents" would be clearer.

Yeah that sounds clear. Awesome puzzle game, very educational.

Re: Show HN: Oops I deleted my bin/ dir

#7
post #5

Very cool! I was a bit confused with the marking criteria. For example, my solution for "list all files on one line" appears to work correctly but is said to be incorrect. shopt -s dotglob; for i in *; do echo -n "$i "; done EDIT: I now see that the correct answer is simply "`echo *`". Despite having a dotfile in the directory, it should not be shown.

Ah, that is a bug the dotfile should not be there. Thanks!

Re: Show HN: Oops I deleted my bin/ dir

#8
post #2

Hello HN: This is a a modification to an old side-project that explores what is possible when you are left with a shell and no utilities on a Linux machine.

It's not really that educational tbh. I am not a bash guru, nor do I wish to be one, so the second question left me cold with no desire to proceed any further.

It's a fun game for those with the skills, but an instructional tool it is not.

Re: Show HN: Oops I deleted my bin/ dir

#9
Very amusing - and brings back memories of when a friend actually did remove the /bin (and IIRC the /lib64) a couple months ago :-)

Getting stuck on #/oops_print_file_contents - the command times out. Not sure if I'm missing a better solution or perhaps the server is overloaded

The command I tried was (here protected with rot13):

zncsvyr sbbone --

A mild irritant is that the usual ^W (delete word to the left) instead closes tab in Firefox. Perhaps this could be prevented...?

Re: Show HN: Oops I deleted my bin/ dir

#10
post #8
post #2

Hello HN: This is a a modification to an old side-project that explores what is possible when you are left with a shell and no utilities on a Linux machine.

It's not really that educational tbh. I am not a bash guru, nor do I wish to be one, so the second question left me cold with no desire to proceed any further. It's a fun game for those with the skills, but an instructional tool it is not.

It's an algebra game.

Given a set of operations, can you get to state X?

Usually requires a lot of searching and/or expertise, however the solutions will break pretty easily depending on which shell you're using, etc. So doesn't really teach you anything aside from iterating over a set of all possible operation combinations.

Post reply on HN