MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat
17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
JanFeb Mar
Apr May Jun
Jul Aug Sep
Oct Nov Dec

Mon, Dec 12, 2016 8:22 am

Converting man pages to HTML files with man2html

When I want to convert man pages to HTML files, I usually employ the groff utility. E.g., I can locate the modifyrepo man page with the find command and then cut and paste the location of the man page file after the cat command or use command substitution to take the output from the find command as input to the cat command. I then pipe the output into the groff command. But sometimes that method doesn't produce clean HTML code. An alternative means of producing an HTML file from a man page is with the man2html utility.

[ More Info ]

[/os/unix/programs/utilities] permanent link

Sun, Sep 18, 2011 6:15 pm

Extracting the Contents of a .bz2 File

To extract the contents of a .bz2 file on a Linux or Unix system, such as Solaris, you can use the bunzip2 command.

bunzip2 file.bz2

The .bz2 file will be deleted when its contents are extracted. If you wish to keep the original .bz2 file, you can use the -k or --keep options.

     -k --keep
          Keep (don't delete) input files during  compression  or


  1. File Extension .BZ2 Details
  2. Extract a bz2 or bzip2 file
    By: qmchenry
    Date: July 11, 2006
  3. Running Linux
    By: Matt Welsh
    Third Edition, Chapter 7, Archive and Compression Utilities, pages 184-187

[/os/unix/programs/utilities] permanent link

Wed, May 30, 2007 3:28 pm

List-Update Script

Every month I receive a spreadsheet with a list of members in a retirees' organization. I extract the column in the spreadsheet containing the email addresses to a text file on a PC and then transfer it to a Solaris server that handles email addressed to the mailing list. I've been manually processing the text file each month to remove blank email addresses, duplicates, and invalid email addresses. At lunch today, I wrote a small BASH script, list-update to automate the process.

Since I don't use sed often, but sometimes need to use it to delete blank lines, such as the many that occur in the membership list, I thought I would put a note to myself here on the syntax for the sed command to remove blank lines from a file:

cat filename | sed -e '/^$/d' > newfilename

[/os/unix/programs/utilities] permanent link

Wed, Feb 08, 2006 11:15 pm


If you need to generate a calendar in HTML, Pcal will allow you do generate one. To generate an HTML file you specify the -H parameter. You specify the output file with the -o parameter. Otherwise output will go to standard output, e.g. the screen. You can specify that a calendar be created for an entire year by putting a two digit representation of the year at the end of the command line. You can specify text to be used for both the title of the webpage, i.e. what you commonly see in the top line of your browser, and for the webpage heading by using the -C parameter. E.g. to create a file /tmp/mycalendar.html for 2006 with a title and heading of "My 2006 Calendar", you could use the command below. Remember, the case of the letters you use for the parameter is significant. A -O is not the same as a -o.

pcal -H -o /tmp/mycalendar.html -C "2006 Calendar" 06

2006 Calendar created by the above command. The program can also produce postscript output.

If a file exists by that name in the specified directory, it will be overwritten. I've created a simple BASH script, generate-calendar, that takes 3 parameters, two of which are optional, that will check if the output file exists. If it does, it will prompt as to whether it should be overwritten.

Usage: generate-calendar -o output_file [-t title]  [-y yy]

The script takes optional title and year arguments

-o specifies the HTML output file, e.g. /example/index.html
-t specifies the title and heading for the HTML file
   If there is a space in the title enclose it in double quotes
-y specifies the year for the calendar, e.g. 06
   If no year is specified, the calendar will be created only
   for the current month

A companion program for pcal is Lcal, which generates a graphical "lunar phase" calendar for an entire year.

[/os/unix/programs/utilities] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo