Welcome, guest | Sign In | My Account | Store | Cart

It's a shell script that lets you save the man pages for one or more Unix commands, system calls or other topics, to text files, after cleaning up the man command output to remove formatting meant for emphasis, printing, etc.

More information here:

https://jugad2.blogspot.in/2017/03/m-unix-shell-utility-to-save-cleaned-up.html

Bash, 26 lines
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Put the code below into a shell script called m, in one of the 
# directories that are on your Unix PATH.

# Make it executable with:

# chmod u+x m

# Then you can run it with:

# m topic_name ...

# where the ... stands for more (optional) man page topic names.

# E.g.: m fopen fclose

# The cleaned-up man page for each topic specified, will be stored in 
# a text file called <topic_name>.m in your ~/man directory.

# You can then view it any time with the cat, more, or less commands 
# or with your text editor. E.g.: vi ~/man/fopen.m

mkdir -p ~/man
for i
do
    man $i | col -bx > ~/man/$i.m
done

Put the code below into a shell script called m, in one of the directories that are on your Unix PATH.

Make it executable with:

chmod u+x m

Then you can run it with:

m topic_name ...

where the ... stands for more (optional) man page topic names.

E.g.: m fopen fclose

The cleaned-up man page for each topic specified, will be stored in a text file called <topic_name>.m in your ~/man directory.

You can then view it any time with the cat, more, less commands or with your text editor. E.g.: vi ~/man/fopen.m

You can run the m command in this way for any man page topics that you need to refer to often (or even once only), and from then on, can just view the needed .m files instead of running the man command each time.

More information here:

https://jugad2.blogspot.in/2017/03/m-unix-shell-utility-to-save-cleaned-up.html

Created by Vasudev Ram on Sat, 25 Mar 2017 (BSD)
Bash recipes (41)
Vasudev Ram's recipes (93)

Required Modules

  • (none specified)

Other Information and Tasks