Skip to content

Instantly share code, notes, and snippets.

@kakkun61
Created November 26, 2017 17:27
Show Gist options
  • Save kakkun61/bba3871281ec48ee404e1b448f7d5a55 to your computer and use it in GitHub Desktop.
Save kakkun61/bba3871281ec48ee404e1b448f7d5a55 to your computer and use it in GitHub Desktop.
#include<stdio.h>
#include<stdlib.h>
#define COMMAND_SIZE 256
int main(int argc, char **argv) {
char *mysql_config="C:\\Strawberry\\perl\\bin\\perl.exe /tools/mysql/current/bin/mysql_config.pl";
char command[COMMAND_SIZE];
if (argc == 0) {
snprintf(command, COMMAND_SIZE, "%s", mysql_config);
} else {
snprintf(command, COMMAND_SIZE, "%s %s", mysql_config, argv[1]);
}
system(command);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment