Hi guys,
I need to create a script to check the diskspace in another server and I have to put that script in crontab.
So, the question is how do I store the password in my script.
Here's part of my script and I'm from ypprod01.
Thanks guys
I need to create a script to check the diskspace in another server and I have to put that script in crontab.
So, the question is how do I store the password in my script.
Here's part of my script and I'm from ypprod01.
Code:
ssh ypprod05 [and input password]
df -h /home
number=`df -h /home | tail -1 | sed 's/G//3' | awk '{print $4}'`
echo $number
Thanks guys