Timothy Swenson writes:

> >Is there a way to get a c68 program to accept a commandline
> >(or part of a command line) from a file/pipe.
> >
> >I want to achieve something like:
> >   1  EX cprog ; "-options parameters <filelist_file"
> >rather than
> >    2 EX cprog ; "-options parameters file1 file2 .. fileN"
> >Or is all this entirely up to cprog?
>
> I'm pretty sure C68 supports file redirection.  Since the filelist_file
> would be coming in on STDIN and not as an argument list, it is up to the
> program to process it correctly.  With some programming skill, you could
> get the program to accept data either way.  Using an option like "-f
> filelist_file" would work.  This would have the user tell the program to
> use a file list file (and not list any files in the command line.
>
> If a program will work in Unix, then it should work in C68.  It's very
Unix
> like in how it handles itself.

But is the command line the same as stdin? I tried the syntax in (1) above
and also:

    3 EX cprog, file_list, #1; "-options parameters "

with file_list containing

    file1 file2..fileN

to no avail. (2) works as expected. Both (1) and (3) are recognised by c68
(as if you give a wrong file name you get a "not found" error)

    4 EX cprog, file_list, #1; "-options parameters -f file_list"

returns "cannot open -f file_list" - ie it thinks -f file_list is one of the
list of files.. -f as one of the options makes the program take <parameters>
to be the file_list filename! Ie it will happily except a list of parameters
from the file, but not a list of files.

Any further ideas?

Per

Reply via email to