unstack - fix ipcvecs
[minix.git] / commands / ash / bltin / line.c
blobaa6970eed87e5f0e329836793c286d39fadc687e
1 /*
2 * The line command. Reads one line from the standard input and writes it
3 * to the standard output.
5 * Copyright (C) 1989 by Kenneth Almquist. All rights reserved.
6 * This file is part of ash, which is distributed under the terms specified
7 * by the Ash General Public License. See the file named LICENSE.
8 */
10 #define main linecmd
12 #include "bltin.h"
15 main(argc, argv) char **argv; {
16 char c;
18 for (;;) {
19 if (read(0, &c, 1) != 1) {
20 putchar('\n');
21 return 1;
23 putchar(c);
24 if (c == '\n')
25 return 0;