Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char *argv[])
- {
- char out[1035];
- FILE* f = popen("Z:\\usr\\bin\\bash -c \"echo hi\"", "r");
- if (f == NULL) {
- printf("Error\n");
- return 0;
- }
- while (fgets(out, sizeof(out), f) != NULL) {
- printf("%s\n", out);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment