Interactive shell script/function help needed

view story

http://serverfault.com – The following command on OSX will change an Open Directory (Apple's LDAP) password. The $ is the prompt: $ dscl -u diradmin -P 'password' /LDAPv3/ passwd /Users/username newpassword I would love to turn this into an interactive shell function of some sort (let's call it 'odpasswd') that first prompts the admin for the username whose account they want to change passwords for, then for the password, along these lines: $ odpasswd $ Username you'd like to change passwords for? johnd $ New Password? secretpassword $ Done! Password changed successfully for username 'johnd' to 'secre (HowTos)