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.
EDIT: I now see that the correct answer is simply "`echo *`". Despite having a dotfile in the directory, it should not be shown.
[ Parent
| on HN ]
Ah, that is a bug the dotfile should not be there. Thanks!
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.