Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Inspired by explainshell, I wrote a script (https://github.com/learnbyexample/command_help) to be used from the terminal itself. It is a bit buggy, but works well most of the time. For example:
$ ch grep -Ao
grep - print lines that match patterns
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines. Places a
line containing a group separator (--) between contiguous groups of
matches. With the -o or --only-matching option, this has no effect
and a warning is given.
-o, --only-matching
Print only the matched (non-empty) parts of a matching line, with
each such part on a separate output line.
I like to use cht.sh you it maps it's subdirectories to commands and you just curl it.
Eg:
curl cht.sh/cat
curl cht.sh/grep
you're probably looking for getopt/getopts. one big difference between them is getopt handles --long options while getopt doesn't.