Every time I run into an issue within UNIX, there are times I need to dig up a MAN page. The “man” pages are useful but sometimes I’m in a bit of a rush and I just want to get to the meat of the issue that I know I’m not quite remembering.
I’ve decided to take things into my own hands and found out How To make my own mini man page!
After looking up my info in “man,” I actually paste the critical content that was useful to me in a text file, which for this example, I’ve named man-text.
I now have about 75 lines of things that I intermittently can’t remember. So I’ve created the following executable script that when run, gives me the meat of the problem instantly without the gibberish.
Below is the content of that file, and to get my answer, I can put in “mini-man cp”, or “mini-man cp direct” and I get the one line I need to help me on my way.
In this case, my output to screen shows me this: unix, cp, copying directories cp -r
It speeds up my day because I find myself using it at least once or twice a day.
::: Here’s the KSH script example I use:
#!/bin/ksh
thisver=”1.0, 3-10-10″
location=”/u/sxx/aacct/dir”
print ” Mini Man $thisver “
print “”
if [[ $# -eq 3 ]] ; then
grep $1 $location/man-text | grep $2 | grep $3
fi
-
if [[ $# -eq 2 ]] ; then
grep $1 $location/man-text | grep $2
fi
-
if [[ $# -eq 1 ]] ; then
grep $1 $location/man-text
fi
exit
That’s it! Nuthin’ too fancy.








