c code vs shell script again?
thank's to someone who help me before, but there are some question again. how can i passing argument to shell script and how can i get return value from that when i run test?
if the c code like :
/*test.c*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("/bin/csh -c ./coba apa");
printf("succes\n");
return 0;
}
and shell script (coba) like :
#!/bin/sh
echo $1
i=10
return $i
so i want "apa" can be passed to coba script and the value $i in coba can be access in test.c
please, how?
|