Created
January 8, 2018 10:04
-
-
Save directorscut82/32cb01fa37d3ee625b161dbb0d9e99cd to your computer and use it in GitHub Desktop.
print sha256 sums
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
int printsha256sums(char* fname) | |
{ | |
char path[1035]; | |
char command[256]; | |
snprintf(command,256,"sha256sum %s",fname); | |
FILE *fpp = popen(command, "r"); | |
if (fpp == NULL) | |
return 0; | |
fgets(path, sizeof(path)-1, fpp); | |
fprintf(stderr,"%s", path); | |
pclose(fpp); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment