Save Time Using Manop to Print Only Selected Content From the Man Page
Manop is a simple Bash script that outputs an option and a description

Introduction
A man page (manual page) is software documentation for a Unix operating system. Some of the commands have many lines on the man page and it can be difficult to find the information you are looking for.
I have introduced manop before and now you can install it using Homebrew. manop only outputs a command description or an option description from the man or help page. [Repo URL]
manop is for macOS/Linux. The name manop came from “man option”. By using manop, you can save your variable time.
Installation
macOS using Homebrew
If you have Homebrew on your macOS, your can run:
brew tap shinokada/manop && brew install manopCheck if it is working:
manop -h
Name:
=====
manopVersion:
=====
v0.1.4
...Installing manop using Awesome package manager
The awesome is a simple shell script package manager. Awesome installs a shell script package from a GitHub repo on your macOS/Linux.
After installing Awesome package manager:
awesome install shinokada/manop
Manual installation
I use Ubuntu for this example. But you should be able to adopt the same method for the other Linux systems.
Clone/download this repo and make a symlink to your bin directory. Your bin directory needs to be in your terminal configuration file’s PATH variable. (See more on this.)
I keep manop in the /home/your-username/awesome directory:
mkdir /home/your-username/awesome
cd /home/shin/awesome
git clone https://github.com/shinokada/manop.gitCreate the ~/bin directory:
mkdir ~/binCheck if /home/your-username/bin in the PATH variable:
echo $PATH
/home/your-username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/binIf not add the /home/your-username/bin directory to the ~/.bashrc file.
export PATH="/home/your-username/bin:$PATH"
Source the ~/.bashrc file and check it again:
source ~/.bashrc
echo $PATHAdd a symlink:
ln -s /home/your-username/awesome/manop/manop ~/bin/manopCheck if the symlink is working:
which manop
/home/your-username/bin/manop
manop -hName:
=====
manop
...How to use it
Let’s print the mkdir -poption description:
manop mkdir -p

How about the ls command description:
manop ls
You can print the builtin command cd description:
manop cd
Let’s print the builtin cd -e option description:
manop cd -e
The output may have spaces.
manop grep -b
-b, — byte-offset
The offset in bytes of a matched pattern
is displayed in front of the respective
matched line.You can trim spaces using the -t flag:
manop -t grep -b
-b, — byte-offset
The offset in bytes of a matched pattern is displayed in front of the respective matched line.
Conclusion
I often read other people’s scripts. When I come across a command or a command option that I don’t know, I use manop. In this way, I don’t need to use the / command to search within the manual.
If you want to know more about the man page, please reference this article about the Man Page.
Please let me know what you think about manop!
Get full access to every story on Medium by becoming a member.

