#!/bin/sh for i in "$@" do for j in 1 3 5 6 7 do FILE=man$j/$i.$j.gz if [ -f $FILE ] then gunzip < $FILE | nroff -man | more fi done done