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.
echo 'password' | sudo -S command