I am executing a unix command which basically requires response/input from user after pressing ENTER on the first command (copy ftp: flash:). See my commands below.
copy ftp: flash:
Address or name of remote host []? **xx.yy.zz.sa**
Source filename []? **sourceFile.bin**
Destination filename [sourceFile.bin]? **dest.bin**
Accessing ftp://xx.yy.zz.sa/sourceFile.bin...
Now my ask is that I want to execute above set of command (& sub-commands) in a single line (which should include all responses by user) as I will be using this single line command in my Java program. Any pointers for this ?