I need to pass an argument which will change every time from C program to a shell script.
int val=1234;
char buf[100];
sprintf(buf,"echo %d",val);
system("call.sh $buf");
call.sh::
#!/bin/sh
echo "welcome"
echo $*
echo "done"
output of C is::
welcome
done
I cant see the argument value which is 1234 in the script. Can anybody suggest me to get right value...