3 ms·
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 5 // 6 // Those who don't understand unix are doomed to re-implement it, poorly. 7 // 8 int main(
by iamNumber4 9y ago
1 #include <stdio.h>
2 #include <stdlib.h>
3
4
5 //
6 // Those who don't understand unix are doomed to re-implement it, poorly.
7 //
8 int main(int argc, char** argv) {
9 if (argc <=0) return 1;
10
11 char cmd[30] = "";
12
13 snprintf(cmd,sizeof(cmd),"file %s",argv[1]);
14
15 system(cmd);
16
17 return 1;
18 }