Shell script to convert from html format to standard library format
For information about the data base of lattices, see:
Index File and
We suggest that you:
o download this file
o copy it to a new file called htmltostd.sh,
o delete everything up to and including the line "cut 1 here",
o delete the line "cut 2 here" and everything after it,
o then make the file executable.
o To use it, type htmltostd.sh E8.html (for example)
which will create the standard file E8.std
------- cut 1 here -------
# Converts lattice file from html format to standard library format
# Takes latt.html and creates latt.std
if [ "$#" -ne 1 ]
echo "Incorrect number of arguments.
htmltostd.sh converts file for a lattice from html format
to standard library format.
Takes latt.html and creates latt.std
Usage: htmltostd.sh latt.html"
latt2=`echo $latt1 | sed 's/html/std/'`
echo "Using $latt1 to create $latt2"
# perform various checks
if [ ! -f $latt1 ]
echo "$latt1 does not exist"
if [ -f $latt2 ]
echo "$latt2 exists: OK to overwrite? [y/n]"
if [ "$answer" != y ]
# Now do the editing:
# delete banners etc at start and end,
# delete all html commands,
# change < to "less than",
# and > to "greater than".
cp $latt1 $latt2
ex - $latt2 </\%/
---------- cut 2 here -------