# This is an AWK program which writes a shell 'tr' script # It only needs to be run once. # The only reason for it is that the 'tr' script has one # long line with non-ascii characters and it is difficult to # get these files through various transmission schemes (e-mail, # Reflection) without some distortion # To run this AWK program and create the script TR2LATIN, # save this file as MAKETR and then either # (1) do this from the POSIX shell # awk -f MAKETR # or (2) do thise from CI: # /bin/awk "-f MAKETR" BEGIN { TR2LATIN = "TR2LATIN" TR2ROMAN = "TR2ROMAN" a1 = "\300\302\310\312\313\316\317\264\140\136\250\176\331" a2 = "\333\243\257\335\375\260\307\347\321\361\241\277\244" a3 = "\243\245\247\146\242\342\352\364\373\341\351\363\372" a4 = "\340\350\362\371\344\353\366\374\305\356\330\306\345" a5 = "\355\370\346\304\354\326\334\311\357\337\324\301\303" a6 = "\343\320\360\315\314\323\322\325\365\123\163\332\377" a7 = "\377\336\376\267\265\266\276\255\274\275\252\272\253" a8 = "\240\273\261" print "# Shell script to translate HP ROMAN-8 to LATIN-1" >TR2LATIN print "# Ken Hirsch " >TR2LATIN print "# usage from CI:" >TR2LATIN print "# /bin/sh TR2LATIN OUTPUT" >TR2LATIN print "# Note that OUTPUT will be a TEMP file" >TR2LATIN print "# You can use file equations:" >TR2LATIN print "# FILE FRED=BILL,OLD" >TR2LATIN print "# /bin/sh TR2LATIN *FRED" >TR2LATIN print "tr '\\241-\\376' '" a1 a2 a3 a4 a5 a6 a7 a8 "'" >TR2LATIN b1 = "\270\277\257\272\274\174\275\253\372\371\373\254\366" b2 = "\372\260\263\376\262\263\250\363\364\362\270\271\372" b3 = "\375\367\370\365\271\241\340\242\341\330\320\323\264" b4 = "\243\334\244\245\346\345\246\247\343\266\350\347\337" b5 = "\351\332\130\322\255\355\256\333\261\360\336\310\304" b6 = "\300\342\314\324\327\265\311\305\301\315\331\325\321" b7 = "\335\344\267\312\306\302\352\316\376\326\313\307\303" b8 = "\317\262\361\357" print "# Shell script to translate LATIN-1 to HP ROMAN-8" >TR2ROMAN print "# Ken Hirsch " >TR2ROMAN print "# usage from CI:" >TR2ROMAN print "# /bin/sh TR2ROMAN OUTPUT" >TR2ROMAN print "# Note that OUTPUT will be a TEMP file" >TR2ROMAN print "# You can use file equations:" >TR2ROMAN print "# FILE FRED=BILL,OLD" >TR2ROMAN print "# /bin/sh TR2ROMAN *FRED" >TR2ROMAN print "tr '\\241-\\377' '" b1 b2 b3 b4 b5 b6 b7 b8 "'" >TR2ROMAN }