[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stacking arguments in a Unix executable!



On Wed, 9 Jul 1997, Jerry Richer wrote:
>      Now I know I can write a text file with Unix commands in it and in my
> unix shell issue the command "chmod +x file-spec" and then when I issue
> the name of that file the unix commands will be executed.  How do I
> "stack" the valuses that the Unix commands will prompt for?  What is the
> syntax?
>      Thanks, Jerry

In the simplest case, redirecting a file (or pipe) containing the answers
is sufficient. However, this does not let you switch between "stacked" and
interactive input, and will not work for programs expecting fully
interactive input (such as telnet, ftp, pine, etc.) 

For such tasks, you'll need to look for a program called 'expect', which
is a mildly complex solution for a rather complex problem.

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)


---
Send your message for blinux-list to blinux-list@redhat.com
Blinux software archive at ftp://leb.net/pub/blinux
Blinux web page at http://leb.net/blinux
To unsubscribe send mail to blinux-list-request@redhat.com
with subject line: unsubscribe