expect is one of the most useful system administration tools out there! I've used it to batch-modify settings on 100 machines where I couldn't just scp in a new file due to each one needing small variations.
If you don't know expect (and you're a sysadmin), learn it.
If you don't know expect (and you're a sysadmin), learn it.