Initial revision

This commit is contained in:
ceriel 1987-03-16 23:32:34 +00:00
parent c41f370421
commit 89c7440c0d

21
first/myecho.c Normal file
View file

@ -0,0 +1,21 @@
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
int nflag = 0;
if(argc > 1 && ! strncmp(argv[1], "-n", 2)) {
nflag++;
argc--;
argv++;
}
while (--argc > 0) {
fputs(argv[1], stdout);
argv++;
if (argc > 1) putchar(' ');
}
if (!nflag) putchar('\n');
exit(0);
}