|
|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U r
Length: 1940 (0x794)
Types: TextFile
Notes: UNIX file
Names: »reeffect«
└─⟦c93a30372⟧ Bits:30004169/disk3.imd Uniplex II+ V.6 release 1.0 (dansk)
└─⟦c93a30372⟧ UNIX Filesystem
└─⟦this⟧ »up/new/usr/UAP/unsupported/reeffect«
# reeffect - ajust effects in UNIPLEX text file
: '
L..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T..T.R.
'
USAGE='
Usage: reeffect [-V] { -yFROM/TO | -5.04 | -AP.01 } file [file ...]
-yFROM/TO Transform all effect characters in "FROM" string to
those in "TO" string. eg: -yABC/DEF
-5.04 Do standard 5.04 --> AP.02 transforms (as: -yL/I)
-AP.01 Do standard AP.01 --> AP.02 transforms (as: -yEFJKL/JKTUV)
'
# Collect file name(s) in FILES
# And transform arg in TRANSFORM (-yFROM/TO needs more validation, later)
TRANSFORM=
FILES=
for ARG do
case "$ARG" in
-[Vv]) exec echo "$0: Vs. AP.03"
;;
-*) case "$TRANSFORM" in
'') ;;
*) exec echo "Only one transform argument allowed$USAGE";;
esac
case "$ARG" in
-5.04) TRANSFORM="L/I";;
-[Aa][Pp].01)
TRANSFORM="EFJKL/JKTUV";;
-y*/*) TRANSFORM="$ARG";;
*) exec echo "Unknown argument: \"$ARG\"$USAGE";;
esac
;;
*) test -w $ARG || exec echo "Can't write to file: $ARG$USAGE"
FILES="$FILES$ARG "
;;
esac
done
case "$FILES" in
'') exec echo "No file(s) specified$USAGE";;
esac
case "$TRANSFORM" in
-y*) X=`echo "$TRANSFORM" | sed '
s/^-y//
y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
'`
if ( echo | sed "y/$X/" ) >/dev/null; then
# sed liked the TRANSFORM string, so it is probably OK
TRANSFORM="$X"
else
exec echo "
Above \"sed\" error message results from invalid argument: \"$TRANSFORM\"
Both the FROM and the TO string must be of equal length, and should
only contain alphabetic characters$USAGE"
fi
;;
esac
TMP=/tmp/reeff.$$
for F in $FILES; do
echo "Transforming \"$F\" (-yTRANSFORM) ..."
sed '
/@@$/{'"
n
y/$TRANSFORM/
}
" $F >$TMP
cp $TMP $F
rm -f $TMP
done