December 15, 2004 11:37 AM Subscribe
Unix scripting question- how do I automate an interactive command-line application? [MI]
posted by mkultra to Computers & Internet (8 answers total)
I'm using a proprietary FTP application to transmit a file each day, and pick up a receipt of the prior day's file. The application accepts various command line switches that let me execute the upload as a single command, which is fine. Unfortunately, I don't know the name of the receipt file, so I need to log in and do an "mget *" within the application to reliably get the receipt file. Unfortunately, the download parameter I would normally use won't take a wildcard.
So, the meat of my question is, how do I launch a command line application and feed it a command once it starts up, via a shell script?