i will go and see if my touch screen calibrated with a own script. But i have really few experience with shell scripts. I hope anyone can help me.
My idea is it to execute xinput --list-pros <device> and check the terminal output with the entry ...(242): <no items>. 
This is the option if the touch screen not calibrated else there are the x/y coordinates like ...(242): 1 22 333 4444.
In my script I will execute xinput --list-pros <device> and check with grep is there a entry (242) and then check the same line if there a entry <no items>. But i fail to read the output from xinput --list.
# read the terminal output from xinput
$xinput_output= less xinput --list-pros 7
    while read $xinput_output
    do
         # check first line from output
         grep "242" $xinput_output
         if [ $? != 0]
         then
             break;
         else
             # found 242 check x/y coordinates
             grep "<no items>" $xinput_ouput
             if [ $? != 0]
             then
                 #no x/y coordinates, execute xinput_calibration
                 xinput_calibration
                 exit 0
             fi
         fi
    done < $1
 
     
     
    