Getting Help
- 0
- Add a Comment
- No Related Post
Getting Help
Linux is renowned, in part, for its vast and extensive online help system. Each distribution comes complete with all the tools you’ll need to learn more about commands, to explore programming and usage potential, and to gain a deeper understanding about how the Linux kernel and all its various components work.
But, despite the promises of the last few decades of a “paperless offices,” many of us still want hard copy. Documents have a tangibility that we all still require at times. For reasons that even I can’t explain, there’s still a sense of familiarity and comfort in pulling down the manual, riffing through the pages, and finding the answer I was looking for.
Today’s GnomeTweak is a script written by Mike Dickey that answers that need for hard documentation. It’s also further evidence of the flexibility of Linux in meeting user needs, as esoteric as they might be. For documentation junkies like myself, this script to print man pages with a margin for three-hole punching is simple and simply useful.
If you haven’t already done so, create a subdirectory in /home/[username] called bin:
[tony@server tony]$ mkdir ~/bin
Change to the bin directory with the cd command …
[tony@server tony]$ cd bin
… and open your favorite text editor:
[tony@server bin]$ vi punchPrint
Now add the following to the new text file:
#!/bin/sh
cat $1 | pr -t -o 5 -w 85 | lpr
Save the file. Then, make sure the permissions are set for user read and execute:
chmod u+rx punchPrint
And you’re done. Now, when you need to print a man page to add to your binder of most-used commands, you can simply execute the following:
man ls | /home/tony/bin/punchPrint
Your page will be three-hole ready in no time.
