Explaining Shell Commands in the Shell
上で紹介されてるスクリプトですが
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Explaining Shell Commands in Bash この様な関数を作っておくとこんな感じで各コマンドやオプションを説明してくれます。 これは、$ explain 'du -s * | sort -n | tail' du(1) Summarize disk usage of the set of FILEs, recursively for directories. Mandatory arguments to long options are mandatory for short options too. -s (-s, --summarize) display only a total for each argument * -------------------------------------------------------------------------------------------------pipe-- sort(1) Write sorted concatenation of all FILE(s) to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -n (-n, --numeric-sort) compare according to string numerical value -------------------------------------------------------------------------------------------------pipe-- tail(1) Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. $
explain
コマンドの中で、 ManKier Man Pages というサービスのAPIを使って説明を取ってきています。 なのでオンラインでのみ使えます。同じ様なウェブサービス: explainshell.com
explainshell.com は ManKier Man Pages と同じ様にコマンドの説明をしてくれます。 こちらの方がさらに色々と説明してくれるものがあって、 例えばfor
文とかもきっちり説明してくれます。 explainshell.com - for i in $(seq 1 10);do echo i;done なのでこちらの方のAPIが出来たらもっと便利だな、と、 さらにオフラインでも使える様なものになれば便利なのにな、というところではあります。 Explaining Shell Commands in the Shell (2014) Hacker News
Sponsored Links