Should've been printing to stdout. flag is file?
This commit is contained in:
parent
0219a96d6c
commit
35a7640155
1 changed files with 1 additions and 0 deletions
1
tee.c
1
tee.c
|
@ -52,6 +52,7 @@ int main(int argc, char * argv[]) {
|
|||
}
|
||||
|
||||
while((c = getchar()) != EOF) {
|
||||
putchar(c);
|
||||
for(j = 0; files[j] != 0 && j < 27; j++) {
|
||||
if(fputc(c, files[j]) == EOF) {
|
||||
file_failed = 1;
|
||||
|
|
Loading…
Reference in a new issue