1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 10:15:19 +02:00

Fix echo shell command to print all arguments.

This commit is contained in:
Peter Zotov 2010-12-04 05:17:56 +03:00
parent 536abb4135
commit 4f6670e5af

11
shell.c
View File

@ -319,7 +319,16 @@ static int builtin_echo(int argc, char *argv[]) {
return -1;
}
puts(argv[1]);
for(int i = 1; i < argc; i++) {
printf("%s", argv[i]);
if(i < argc - 1) {
printf(" ");
} else {
printf("\n");
}
}
return 0;
}