[Ubuntu] Simple way to pass passwords on a shell script

here is the code for example: 

 

#!/bin/bash
echo -e "your_password\nyour_password" | sudo /home/davidhhuan/the_shell_you_want_to_run.sh


posted @ 2012-11-12 11:34  DavidHHuan  阅读(261)  评论(0编辑  收藏  举报