Issue
How can i run a command in shell script with sudo? This script will be run by a cron job, so there should be no human intervention to enter a password manually.
Solution
echo 'password' | sudo -S command
Answered By - jcalloway Answer Checked By - Senaida (WPSolving Volunteer)