-
-
Save spiculator/6f00903ede0e88c3dd0a to your computer and use it in GitHub Desktop.
print command and run it (like `make` does)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char **argv) | |
{ | |
int i; | |
printf( "+" ); | |
for( i = 1; i < argc; i++ ) | |
printf( " %s", argv[i] ); | |
printf( "\n" ); | |
if( argc > 1 ) | |
execvp( argv[1], argv + 1 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works like this: