I'm trying to create a here document to automate the sudo command. Anyone have any experience with this? This is what I have but it's not working, it still prompts for password:
I found this:
..but I would rather stay away from external tools.
Thanks for your help!
Code:
!/usr/bin/ksh
sudo - root pkgadd <<HereDoc
password
HereDoc
I found this:
..but I would rather stay away from external tools.
Thanks for your help!