!シェルで入力を自動化する expect を使うとshなどの入力待ちや入力を自動化できる。 #!/bin/sh expect -c " set timeout 10 spawn /usr/bin/htpasswd /etc/httpd/.svn_htpasswd $1 expect New\ password:\ send \"$1\r\" expect Re-type\ new\ password:\ send \"$1\r\" expect \"$1\" " {{category2 OS,Linux}}