htmltostd.txt Shell script to convert from html format to standard library format For information about the data base of lattices, see: Index File and Abbreviations. 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 ------- #!/bin/sh # htmltostd.sh # Converts lattice file from html format to standard library format # Takes latt.html and creates latt.std if [ "$#" -ne 1 ] then 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" exit 1 fi latt1="$1" latt2=`echo $latt1 | sed 's/html/std/'` echo "Using $latt1 to create $latt2" # perform various checks if [ ! -f $latt1 ] then echo "$latt1 does not exist" exit 1 fi if [ -f $latt2 ] then echo "$latt2 exists: OK to overwrite? [y/n]" read answer if [ "$answer" != y ] then exit 1 fi fi # 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 </\%/ g/^/g w q ! exit ---------- cut 2 here -------