8 ms·
Explain shell
- tptacek 8y agoThis is great, but the man page for pipes is probably not helpful to the kinds of people who benefit from this tool.
- _they 8y agohttps://news.ycombinator.com/item?id=6834791 https://news.ycombinator.com/item?id=6834791
- rezahandzalah 8y agoCurious, how long is it until it's okay to post a duplicate?
- svnpenn 8y agoI think 1 year is reasonable, that guy is a dick
- ohyeshedid 8y agoOr, ya know, it's kind of normal around here to link to previous discussions.
- dang 8y agoNo no, it's customary on HN to link to previous discussions because they're interesting to look at! Linking to a previous submission with no comments is frowned upon, but a big past discussion is a generous offer. People sometimes think we (moderators) are being jerks when we post such links as well. I'm a bit puzzled about what to do about that. It's tedious to post "because it might be interesting" every time. (p.s. I get that your positive intention was to support the submitter of the article. But on HN, please express your positive intentions more directly. That user wasn't a dick, and it sucks to come to the internet and see oneself described that way.)
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- dec0dedab0de 8y agoI dont know the exact time but it wont let you if it has not been long enough. And it is tradition for someone to post links to previous discussion.
- amingilani 8y agoUnless I'm going crazy, the guidelines used to say 1 year.
- dang 8y agoThat's a frequently asked question! https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html
- rezahandzalah 8y agoThank you. > If a story has had significant attention in the last year or so, we kill reposts as duplicates. If not, a small number of reposts is ok. I was embarrassed it's in there and expected a definitive rule. Now I'm not feeling that bad ;)
- dang 8y agoYup and https://news.ycombinator.com/item?id=13989215 https://news.ycombinator.com/item?id=13989215, from 2017.
- Viperus 8y agoIf you really want to know how many time it has been posted, HN links to "from" tab when you click the site in the parentheses instead of the title: https://news.ycombinator.com/from?site=explainshell.com https://news.ycombinator.com/from?site=explainshell.com
- emit_time 8y agoExplains Hell
- cogburnd02 8y agoReminds me of 'expert sex change,' haha.
- colordrops 8y agoA command line version would be great.
- alexktz 8y agohttps://tldr.sh/ https://tldr.sh/
- monkpit 8y agoCan’t view the page on iPhone 6 and safari. Doesn’t let you zoom out to see the whole page at once.
- h1d 8y agoI'm surprised that some sites just don't load on a 5 year old environment while providing nothing more valuable than sites from 15 years ago. Frameworks just need to do better.
- WalterGR 8y agoWhich 15-year-old site is this one equivalent to?
- dotancohen 8y agoI suspect that GP is referring to layout and formatting, not content.
- platz 8y agoThere's also https://www.shellcheck.net/ https://www.shellcheck.net/
- reilly3000 8y agoWelp, 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.
- PurpleRamen 8y agoYou define a function named :, which calls iself and goes in the background. Then you call : at the end and start the neverending chain of :-calls till your memory bleeds.
- 1_player 8y agoNot really: the function `:` calls itself and _pipes_ into itself. The difference is - from what I can deduce - that if it were to only call itself, there would be up to 2 `:` processes running at a time, while the bash call stack would grow indefinitely. Using all your RAM but not an actual fork bomb. Adding the pipe makes the number of `:` processes grow exponentially, and very quickly you reach the limit of 16384 active processes (PIDs, actually) on a Linux box.
- lebanon_tn 8y agoNot quite wiki (you have to create your own notes) but you may find this utility helpful: https://github.com/sinclairtarget/um https://github.com/sinclairtarget/um
- taneq 8y agoIt's a classic "fork bomb": https://en.m.wikipedia.org/wiki/Fork_bomb https://en.m.wikipedia.org/wiki/Fork_bomb
- andai 8y agoYou have gazed upon the smileyface of doom. Also, that does sound great.
- intertextuality 8y agoIts also known as a fork bomb! I have one tattooed on my arm.
- BossingAround 8y agoExplain 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 documentation would be a core functionality and focus of open source developers. Also, if I find a command which flag is not explained by explain shell, is there some source I can create PR to? Some DB, where I could propose the addition..?
- emj 8y agoThe 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 built upon the original man pages, or maybe you can create some kind of new service like http://www.bashoneliners.com http://www.bashoneliners.com https://www.commandlinefu.com https://www.commandlinefu.com to add your own documentation for random commands and options.. That said good documentation is a hard problem, what to document, how to do it, and what use it will have down the line. Your goal is not everyone elses goal, I always come to the problem from the other side: "I need this extra thing from this command, do I need to code somehting custom or is there something that can do it for me". So it's mostly a question of refrasing problems that fit the tools I have rather than looking up what one option does.
- nerdponx 8y agoIt's not the terminal's fault, it's because man lacks semantic markup.
- emj 8y agoThere is sematic lookup, but I've never seen anyone use it except here on HN: https://news.ycombinator.com/item?id=15776153 https://news.ycombinator.com/item?id=15776153 > $ apropos -s 3 Va=optind -a Va=optarg > https://man.openbsd.org/whatis.1 https://man.openbsd.org/whatis.1
- gatewaynode 8y agoWhy is the first example a fork bomb?!?
- czr 8y agoBecause it's a good example of confusing shell code?!?
- freecodyx 8y agoWhat I like most about this kind of posts. Is that users will share other alternatives and gems. Not disspointed
- asicsp 8y agoInspired by this site, I made a handy shell script[0] for use from cli - good enough to lookup documentation for options from man/help pages. Doesn't cover all the features offered by explainshell, there are issues with some corner cases and tested only on Ubuntu [0]https://github.com/learnbyexample/command_help https://github.com/learnbyexample/command_help
- noir_lord 8y agohttps://explainshell.com/explain?cmd=rsync+--progress+-avr+-e+%27ssh+-p47999%27+ https://explainshell.com/explain?cmd=rsync+--progress+-avr+-... This is really well done, what a neat resource.
- bernardv 8y agoNicely done
- mitchtbaum 8y agoReminds me of: - http://worrydream.com/KillMath/ http://worrydream.com/KillMath/ - https://regexr.com/ https://regexr.com/ - https://simple.wikipedia.org/wiki/List_of_mathematical_symbols https://simple.wikipedia.org/wiki/List_of_mathematical_symbo... - https://rpi.edu/dept/math/ms_graduate/resources/SayingMath.pdf https://rpi.edu/dept/math/ms_graduate/resources/SayingMath.p...
- amelius 8y agoThis is convenient but I still stand by the statement I made here: https://news.ycombinator.com/item?id=16085604 https://news.ycombinator.com/item?id=16085604
- lolikoisuru 8y ago>Bash has a huge number of little shortcuts that are difficult to learn. [snip] it is difficult to Google for its meaning 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 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 http://mywiki.wooledge.org/FullBashGuide
- lolikoisuru 8y agoThe only thing one should gather from these threads is that mos people on this site are completely incapable of using the shell and are too lazy to learn it.
- cogburnd02 8y agoOr, alternately, most people on this site are interested in learning how to use the shell, and are therefore interested in tools like explainshell, which make such learning easier.
- mladen5 8y agoI love this so much. Its perfect tool for developers, i don't know how i didn't encounter this sooner, it exists for more then 5 years.