Welp, I still don't know what :(){ :|:& };: exactly does, but it sure borked my WSL. Error: 0x80070040 after forking too many processes. I know comment moderation sucks, but it would be great to have some kind of wiki/comment system/human generated notes on popular commands.
Explain shell
41–50 of 56 posts
Re: Explain shell
#42Re: Explain shell
#43Earlier quoted context omitted.
The terminal was not built for that kind of automatic lookup, and I often find that options are only interesting in their contexts, so while it might in many cases be possible to show the docs for one option only I think you would have to write a man pages in a different style to make that really usefull. The best place for you to create a PR is against the original program, it says on Explainshell that everything is…
It's not the terminal's fault, it's because man lacks semantic markup.
https://news.ycombinator.com/item?id=15776153
> $ apropos -s 3 Va=optind -a Va=optarg > https://man.openbsd.org/whatis.1
Re: Explain shell
#44Re: Explain shell
#45Welp, I still don't know what :(){ :|:& };: exactly does, but it sure borked my WSL. Error: 0x80070040 after forking too many processes. I know comment moderation sucks, but it would be great to have some kind of wiki/comment system/human generated notes on popular commands.
Interesting that WSL does not take the entire host to doom.
Re: Explain shell
#46This is convenient but I still stand by the statement I made here: https://news.ycombinator.com/item?id=16085604
Everything you could ever ask for is in the manual and also in the man page.
RTFM: https://www.gnu.org/software/bash/manual/bash.html
If you need a tutorial or a guide then try this one: http://mywiki.wooledge.org/FullBashGuide
Re: Explain shell
#47Welp, I still don't know what :(){ :|:& };: exactly does, but it sure borked my WSL. Error: 0x80070040 after forking too many processes. I know comment moderation sucks, but it would be great to have some kind of wiki/comment system/human generated notes on popular commands.
bomb() { bomb | bomb & }; bombRe: Explain shell
#48Re: Explain shell
#49Why is the first example a fork bomb?!?
Re: Explain shell
#50Explain shell is something that has helped me a lot, but the situation of needing it left me baffled for so long... Why can't I search by command + flag? For example, I know what command A does, but I'm not sure what flag C means. I can search for man A, but why can't I search man A --flag C to get only the relevan portion of the manpage? This has baffled me for years. I'd have guessed that discoverability and docume…
What about: man foo | grep bar Then you only get the line with "bar" in it. (append -C 1 at the end to get 1 line before and 1 after the term you grepped for). And of course you can pimp your terminal experience by using fish ( https://fishshell.com/ ) as it ships with autosuggestions and other really nice features. (Beware that it will not provide 100% POSIX compliance but if that's an issue you can use ZSH or pimp…
I prefer to search from within the pager to see the option description in context:
man httpd
/-n
Then 'n' for the next hit or 'N' for the previous, like vi. This is for 'less' in general, not just man.