#!/usr/bin/csh -f # the question directory is $1 # the persons in question are $2 and $3 echo " Creating link for $2 and $3..." set questionhtml = "questions/$1.html" set found = 0; if (-f "$1/$2.txt") then if ($3 != "x") then if (-f "$1/$3.txt") then echo "
  • " `cat candidates/$2.txt` " and " `cat candidates/$3.txt` "" >> $questionhtml else echo "
  • " `cat candidates/$2.txt` " and" `cat candidates/$3.txt` >> $questionhtml endif else echo "
  • " `cat candidates/$2.txt` "" >> $questionhtml endif set found = 1 else if (-f "$1/$3.txt") then echo "
  • " `cat candidates/$2.txt` "and " `cat candidates/$3.txt` "" >> $questionhtml set found = 1 else if (-f "$1/$2_$3.txt") then echo "
  • " `cat candidates/$2.txt` " and " `cat candidates/$3.txt` "" >> $questionhtml set found = 1 else if (-f "$1/$3_$2.txt") then echo "
  • " `cat candidates/$2.txt` " and " `cat candidates/$3.txt` "" >> $questionhtml set found = 1 else echo "ERROR: No file for $2 or $3!" endif if ($found == 1) then if ($3 != "x") then echo "   (other question responses)" >> $questionhtml else echo "   (other question responses)" >> $questionhtml endif endif