News for hackers. Stuff that matters.
Re:Show HN: Oops I deleted my bin/ dir by KMnO4 on Wednesday July 22, 2020 @10:31AM (#23917402)
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 by jarv on Wednesday July 22, 2020 @10:39AM (#23917488)
Ah, that is a bug the dotfile should not be there. Thanks!
Re:Show HN: Oops I deleted my bin/ dir by jarv on Wednesday July 22, 2020 @11:31AM (#23918081)
So the dotfile is resolved but the solution:

  shopt -s dotglob; for i in *; do echo -n "$i "; done
still isn't valid unfortunately because of the extra space at the end, maybe it should be more forgiving about that.