Not sure if this is right forum - but someone should know
I have a simple C prog (I'm not a proficient C programmer) which accepts any number of command line arguments and processes them. When I run this from the command line - cprog arg1 arg2 arg3 arg4 arg5 ... it works fine.
I have a flat file containing lines of arguments, so I want to run the c prog for each line in the file. I'm doing this in a ksh script using a for..do..done loop. So for each line in the file, the script "appears to be" issuing the correct command (using set -x to check) - problem is the c prog is only seeing 2 arguments (the c prog name itself and it seems to be seeing my arg list from the file as 1 long arg).
Any ideas why this is happening?
Greg.
I have a simple C prog (I'm not a proficient C programmer) which accepts any number of command line arguments and processes them. When I run this from the command line - cprog arg1 arg2 arg3 arg4 arg5 ... it works fine.
I have a flat file containing lines of arguments, so I want to run the c prog for each line in the file. I'm doing this in a ksh script using a for..do..done loop. So for each line in the file, the script "appears to be" issuing the correct command (using set -x to check) - problem is the c prog is only seeing 2 arguments (the c prog name itself and it seems to be seeing my arg list from the file as 1 long arg).
Any ideas why this is happening?
Greg.