Guest_imported
New member
- Jan 1, 1970
- 0
This may seem simple (I hope it is) and sound stupid (I feel stupid).
If I want to compile some C code (read: not script in csh or anything else) but invoke shell commands how do I do it?
In other words if I wanted to have a C program where I wanted to complie something like:
#include <stdio.h>
{
x = awk '{print $7}' infile.txt;
printf ("%x is the value\n"
}
How do I get that value from the shell (using interpreted awk in this case) to x????
I want to write some code and COMPILE it in C, but want to freely use the shell, like in perl or a shell script I would just use ``
But I can't do that in C.
I hope this makes sense, if not please feel free to ask me questions.
Thanks!
If I want to compile some C code (read: not script in csh or anything else) but invoke shell commands how do I do it?
In other words if I wanted to have a C program where I wanted to complie something like:
#include <stdio.h>
{
x = awk '{print $7}' infile.txt;
printf ("%x is the value\n"
}
How do I get that value from the shell (using interpreted awk in this case) to x????
I want to write some code and COMPILE it in C, but want to freely use the shell, like in perl or a shell script I would just use ``
But I can't do that in C.
I hope this makes sense, if not please feel free to ask me questions.
Thanks!