HP3000-L Archives

February 2002, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Wed, 6 Feb 2002 11:29:29 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
The last message I sent had an older, erroneous translation program.  Here
is the corrected program:

# 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\275\274\275\252\272\253"
  a8 = "\240\273\261"

  print "# Shell script to translate HP ROMAN-8 to LATIN-1" >TR2LATIN
  print "# Ken Hirsch <[log in to unmask]>" >TR2LATIN
  print "# usage from CI:" >TR2LATIN
  print "# /bin/sh TR2LATIN <INPUT >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 <INPUT >*FRED" >TR2LATIN
  print "tr '\\241-\\376' '" a1 a2 a3 a4 a5 a6 a7 a8 "'" >TR2LATIN

  print "# Shell script to translate LATIN-1 to HP ROMAN-8" >TR2ROMAN
  print "# Ken Hirsch <[log in to unmask]>" >TR2ROMAN
  print "# usage from CI:" >TR2ROMAN
  print "# /bin/sh TR2ROMAN <INPUT >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 <INPUT >*FRED" >TR2ROMAN
  print "tr '" a1 a2 a3 a4 a5 a6 a7 a8 "' '\\241-\\376'" >TR2ROMAN
}

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2