I wrote that script but if I run it I get this output:
./autotex: line 7: syntax error near unexpected token `then'
./autotex: line 7: ` then'
The script is:
#!/bin/bash
while [ $key = "q"]; do
dateTex = grep $1.tex| cut -b 43 - 54
datePdf = grep $1.pdf| cut -b 43 - 54
if[$dateTex !eq $datePdf]
then
pdflatex $1.tex
fi
read -t 1 -n 1 key
done