diff options
author | rsc <rsc> | 2007-08-24 20:03:40 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-24 20:03:40 +0000 |
commit | 1b789e1d50df4e7b98fa131fc29caf29a5f38bfa (patch) | |
tree | d3a2bd24a03aaede0a51b8e5938db6d55753e96a /echo.c | |
parent | 8e88f9e2c617cc1002039c6e37c3c831319b1f8f (diff) | |
download | xv6-labs-1b789e1d50df4e7b98fa131fc29caf29a5f38bfa.tar.gz xv6-labs-1b789e1d50df4e7b98fa131fc29caf29a5f38bfa.tar.bz2 xv6-labs-1b789e1d50df4e7b98fa131fc29caf29a5f38bfa.zip |
Remove puts in favor of printf.
Allow multiple arguments to ls.
Diffstat (limited to 'echo.c')
-rw-r--r-- | echo.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -7,10 +7,7 @@ main(int argc, char *argv[]) { int i; - for(i = 1; i < argc; i++){ - puts(argv[i]); - puts(" "); - } - puts("\n"); + for(i = 1; i < argc; i++) + printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n"); exit(); } |