  | |  | if the program need two input files | if the program need two input files 2005-06-04 - By Ed Wilts
Back On Sat, Jun 04, 2005 at 03:57:01PM +0800, Frank Lee wrote: > I have a program which waiting for the input from from keyboard for > more than two times. Say, > > #./my_program > please input your input filename: (waiting for input from keyboard for > the first time) > please input your output filename: (waiting for input from keyboard > for the second time) > > > Because I need write a shell script to use this program for many > times. I do not how to avoid the interactive requirement of this > program. It seems it can not be solved by use > > #./my_program <<input_file >>output_file
This should be <inputfile. >>output_file would be okay if you want to append to an existing file. If you want to create the output file, you would use >output_file.
This assumes, of course, that my_program does its reads from stdin and writes to stdout.
-- Ed Wilts, RHCE Mounds View, MN, USA mailto:ewilts@(protected) Member #1, Red Hat Community Ambassador Program
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |