/* REXX */ /* Get a list of files to be converted */ parse arg man /* Locate target path relative to the current path */ address syscall 'getcwd here' lastq = lastpos('/', here) + 1 If lastq > 1 then , llq = Substr(here,lastq) /* complain if current directory name not of expected format */ If Left(llq,3) \= 'man' | Length(llq) \= 4 then Do Say 'Invalid current directory 'here Exit 4 End Digit = Right(llq,1) path = '../cat'Digit'/' Say 'Target path is 'path /* For each file in list, run groff to convert to man page */ do i = 1 to WORDS(man) mand = WORD(man, i) 'groff -mandoc -Tcp1047 'mand' >|'path||mand /* Note: any existing file will be overwritten */ Say 'Updated man page 'mand End i exit 0