[ murray.saul ] cat grade.dat IOS110;70 OPS435;90 ICA001;5 [ murray.saul ] cat makeTable.bash #!/bin/bash if [ $# -ne 2 ] then echo "USAGE: $0 [input-file][webpage-file]" >&2 exit 1 fi if [ ! -f $1 ] then echo "Error: The file pathname \"$1\" does not exist" >&2 exit 1 fi cat > ~/public_html/$2 <<+ My Demo

Here is the table:

+ awk -F";" 'BEGIN {print "
COURSEGRADE
";OFS=""} {if (NR <= 2) {ORS="
"} else {ORS=""};print $1,$2} END {print "
"}' $1 >> ~/public_html/$2 cat >> ~/public_html/$2 <<+

Valid XHTML 1.0 Transitional

+ [ murray.saul ] ./makeTable.bash USAGE: ./makeTable.bash [input-file][webpage-file] [ murray.saul ] echo $? 1 [ murray.saul ] ./makeTable.bash moo.dat table.html Error: The file pathname "moo.dat" does not exist [ murray.saul ] echo $? 1 [ murray.saul ] ./makeTable.bash grade.dat table.html [ murray.saul ] cat ~/public_html/table.html My Demo

Here is the table:

COURSEGRADE
IOS11070
OPS43590
ICA0015

Valid XHTML 1.0 Transitional

[ murray.saul ]