#!/bin/sh ## Print one line summaries in a manner similar to 'help' or 'apropos'. ## but allow grep regular expressions. ## Does not make use of MANPATH although it should. for i ## i is a variable whose value $i is each argument in succession do ## Print lines of windex file matching $i grep "$i" /usr/man/windex || ## If this grep fails to find something then say so (not standard) echo "$i": nothing appropriate done ## Note that the " are needed in the grep in case $i contains characters ## special to shell. This is a distinct possiblity when patterns are involved, ## however, we don't use '$i' because this would prevent the shell from ## expanding $i.