GMS Linux: start?
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int start_index = 1;
|
||||
int no_newline = 0;
|
||||
|
||||
if (argc > 1 && strcmp(argv[1], "-n") == 0) {
|
||||
no_newline = 1;
|
||||
start_index = 2;
|
||||
}
|
||||
|
||||
for (int i = start_index; i < argc; i++) {
|
||||
printf("%s", argv[i]);
|
||||
if (i < argc - 1) {
|
||||
printf(" ");
|
||||
}
|
||||
}
|
||||
|
||||
if (!no_newline) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user