I have a K shell script (ksh) that needs to return an email address. A C program was written (prog1) to now access the email address off of an oracle table. The call to the program in the ksh is
prog1 -p parm1
Based on Parm1 the program will read an oracle table and retrieve the email address. Now I have this email address in a string variable in my program.
How do I get it back to the ksh???
1) I have seen examples where I could do returnvalue = `prog1 -p parm1` and my email address would be in returnvalue. This doesn't seem to be working because I get nothing back. In my C program I am doing a
return(returnString) at the end of my program to pass it back, and it does not seem to be working
2) I can write the email address out to a file, but I am not sure how to define a file ksh, and have the program access or write to it.
Any help and/or direction will be greatly appreciated.
Thanks.