You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
496 B

/* xsh_echo.c - xsh_echo */
#include <xinu.h>
#include <stdio.h>
/*------------------------------------------------------------------------
* xsh_echo - write argument strings to stdout
*------------------------------------------------------------------------
*/
shellcmd xsh_echo(int nargs, char *args[])
{
int32 i; /* walks through args array */
if (nargs > 1) {
printf("%s", args[1]);
for (i = 2; i < nargs; i++) {
printf(" %s", args[i]);
}
}
printf("\n");
return 0;
}