I'm trying to solve a problem where I want a bash script to call a c
program and a value from the c
program to be returned to the bach script and be stored in a variable.
Here is an example (code isn't really written properly):
Bash script:
$value = ./foo
echo $value
C program:
int main() {
//Have a value here that is returned to the variable 'value' in the bash script.
return 0;
}
Is this possible?