Live data from Hacker News

Explain Shell

explainshell.com

51–60 of 179 posts

Re: Explain Shell

#51
This is incredible.

One small change request: the longer commands make me scroll down the page, and I can no longer see what each block is pointing to. Maybe you could fix the command to a top-bar as you scroll down?

Re: Explain Shell

#53
post #4

Very well done. Now I just wish this was a shell program! user@server:~$ explain iptables -A INPUT -i eth0 -s ip-to-block -j DROP

#!/usr/bin/env python import sys import urllib import webbrowser url = "http://explainshell.com/explain?cmd=" + urllib.quote(' '.join(sys.argv[1:])) webbrowser.open_new(url) (webrowser.open_new doesn't seem to be always working for me, not sure why, I've never used it before)

[deleted]

Re: Explain Shell

#54
post #4

Very well done. Now I just wish this was a shell program! user@server:~$ explain iptables -A INPUT -i eth0 -s ip-to-block -j DROP

See https://github.com/jeroenjanssens/data-science-toolbox/blob/... for a bash script that interfaces with explainshell.com.

I wrote this script a while ago. I just needed to update the request because the API had changed a bit since then. Please note that it depends on the scrape tool in the same repository, which in turn depends on the python packages lxml and cssselect. But once you have that set up, you can explain commands from the shell! :-)

Re: Explain Shell

#55
It unfortunately can't decode :(){ :|:& };:, a classic unintelligible forkbomb. I suppose it's only lack of function support that's the issue!

Really neat program, nonetheless!

Re: Explain Shell

#57
post #30
post #4

Very well done. Now I just wish this was a shell program! user@server:~$ explain iptables -A INPUT -i eth0 -s ip-to-block -j DROP

Um... the output wouldn't be interesting for that iptables command -- it's simply a single program with arguments; no shell syntax involved. I suspect what you really want is an iptables demuddler tool that explains the insane "chains" metaphor and explains how individual packets are going to behave. I'd like that too, but it's not this tool.

If all it did was parse program arguments and display usage info it would be super useful. Bash syntax is mostly trivial while there are thousands of arguments across hundreds of programs.

Re: Explain Shell

#58

It unfortunately can't decode :(){ :|:& };:, a classic unintelligible forkbomb. I suppose it's only lack of function support that's the issue! Really neat program, nonetheless!

It could just compare the literal string and have static explanation just for this command.

Re: Explain Shell

#59

I totally love this, it's already incredibly helpful! It's super-functional, and frankly it's very, very nice looking. To Mr. Idan Kamara, the creator of this, I have nothing but the highest praise! Now, I hate to get side-tracked, but for much larger commands, like this one: ps x -o "%r %c " | grep "someScript.sh" | awk -F' ' '{print $1}' | xargs -I % /bin/kill -TERM -- -% that has a lot of parts, it can be hard to…

Very cool - but support for xargs seems to be broken.

    find . -type f | xargs wc -l
http://explainshell.com/explain?cmd=find+.+-type+f+%7C+xargs...

Re: Explain Shell

#60
post #5

Gorgeous. Amazing. Absolutely fantastic. Easy the coolest and most useful thing I've seen on hacker news in a while. Enough gushing, now some bug reports: "read -r random_line "nc HOST PORT | tee movie.mp4 | mplayer -" I can hover over movie.mp4, but I can't scroll down the see the description without losing the emphasis on that path. I'd suggest letting the user click on the portion, or perhaps a long-hover effect?

(I have no relationship with OP or the submitter/submission).

>Gorgeous. Amazing. Absolutely fantastic. Easy the coolest and most useful thing I've seen on hacker news in a while.

>Enough gushing, now some bug reports:

I like the way you wrote your comment! It could stand as an example to everyone. Yours might have had enough gushing, but I think every "negative" comment should start with as high praise as it can muster.

If the whole thing isn't as good, then it should first be "damned with faint praise" and then specific constructive criticisms shown. Obviously the praise doesn't have to be as strong as your comment.

I just want to point out how awesome a comment like yours is - it is incredibly hard to put together and share something. We could all do well to remember that when we point out how to improve it.

Post reply on HN