SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the -S flag to read from std input. Find below an example:
-S
function shutd() { echo "mySuperSecurePassword" | sudo -S shutdown -h now }