Live data from Hacker News

Explain Shell

explainshell.com

21–30 of 179 posts

Re: Explain Shell

#21
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

I'll donate $100 if the author wants to build this and open source it. [Ed: As a shell application locally]

A new "explain" command could help me, my team, and save us an enormous amount of time getting up to speed on some of our org's long-term system maintenance scripts.

Re: Explain Shell

#22
The UI with the svg "wiring" is awesome. You should consider abstracting away that functionality so that it can be reused by other projects.

Right now I'm imagining explainphys ;) where each term in a physics equation is explained e.g. The magnetic force felt by a particle of charge q moving with velocity \vec{v} in a magnetic field \vec{B} is

      \vec{F}_B =   q \vec{v} × \vec{B}
       |            |   |     |   |______magnetic field    
    magnetic force  |   |     |
                    |   |   cross
               charge   |   prod.
                        |
                   velocity of particle

Re: Explain Shell

#23
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

You can run the web server locally. See the source code readme:

https://github.com/idank/explainshell

It should be trivial to whip something up that will generate the right URL for a set of arguments, running either on your local web server or against explainshell.com

Re: Explain Shell

#24
post #21
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

I'll donate $100 if the author wants to build this and open source it. [Ed: As a shell application locally] A new "explain" command could help me, my team, and save us an enormous amount of time getting up to speed on some of our org's long-term system maintenance scripts.

How about an API where you can POST your script with curl -X and a unique link is returned that explains the script when you hit it with a browser?

#shutupandtakemymoney (DevOps is fun, teaching not always)

Re: Explain Shell

#25
This is beautiful! It will come in handy for filling in the vast holes in my knowledge. I think it would also make a great resource for those just starting to work with shell. Very well done indeed!

Re: Explain Shell

#26
post #11

I don't know what I was expecting, but one of my most-used command lines, "du -a | grep foo" is pretty uninformative.

If you're just trying to locate a file in the current directory, you should probably be using find.

Re: Explain Shell

#27

The UI with the svg "wiring" is awesome. You should consider abstracting away that functionality so that it can be reused by other projects. Right now I'm imagining explainphys ;) where each term in a physics equation is explained e.g. The magnetic force felt by a particle of charge q moving with velocity \vec{v} in a magnetic field \vec{B} is \vec{F}_B = q \vec{v} × \vec{B} | | | | |______magnetic field magnetic for…

Or maybe cdecl [0].

[0]: Online version: http://cdecl.org/.

Re: Explain Shell

#28
post #11

I don't know what I was expecting, but one of my most-used command lines, "du -a | grep foo" is pretty uninformative.

I think I can one-up you.

  (while :; do cat ; sleep 2 ; done) 

Re: Explain Shell

#29
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

I thought of quickly writing one, but it doesn't have an API. Something like this would work well:

POST your query, e.g.: tar zcf - some-dir | ssh some-server "cd /; tar xvzf -"

Returns:

    [
        ["tar(1)": "explanatory text"],
        ["z": "explanatory text"],
        ["x": "explanatory text"],
        ["f file": "explanatory text"],
    ]
etc.

Re: Explain Shell

#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.

Post reply on HN