0

I've written a short bash script to record the temperature of my Pi which I'll schedule in cron to run every 15 mins and output to a file on my desktop called readings.txt

The problem is the command needs sudo privileges to run. So my question is how do I enable automatic entry of the password into the command within the script?

#!/bin/bash
sudo vcgencmd measure_temp >> ~/Desktop/readings.txt
Kulfy
  • 18,154
Dave P
  • 1

0 Answers0