Last active
May 6, 2019 14:36
-
-
Save Draphar/0731da6f6df90a6b13d307e645f94527 to your computer and use it in GitHub Desktop.
C program to set an exit code, for testing purposes
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<stdlib.h> | |
int main(int argc, char* argv[]){ | |
if(argv[1] == NULL) { | |
return 0; | |
} else { | |
return atoi(argv[1]); | |
} | |
} |
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
curl https://gist.githubusercontent.com/Draphar/0731da6f6df90a6b13d307e645f94527/raw/b89c9d0b4f99b7d0a9f9136cd382630ce80ea7b3/exitcode.c -o exitcode.c | |
sudo gcc -o /usr/bin/exitcode exitcode.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment