home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <unistd.h>
- #include <string.h>
-
- void main(int argc, char *argv[])
- {
- if (argc == 1)
- system("id -Gn");
- else
- {
- int counter = 1;
- while (argc > 1)
- {
- char buffer[208];
-
- fprintf(stdout, "%s : ", argv[counter]);
- fflush(stdout); /* otherwise, id's output will precede ours */
- strcpy(buffer, "id -Gn ");
- strncat(buffer, argv[counter], 200);
- buffer[207] = 0x00;
- system(buffer);
- counter += 1;
- argc -= 1;
- }
- }
- }
-