Reading input and temperature in a script