pastebin

Paste #xk4 -- näytä pelkkänä tekstinä -- uusi tämän pohjalta

Värjäys: Tyyli: ensimmäinen rivinumero: Tabin korvaus:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
$ cat err.c
#include <stdio.h>
#include <unistd.h>

int main(void)
{
    fprintf(stderr, "foo");
    sleep(3);
    fprintf(stderr, "bar\n");
    sleep(3);
    return 0;
}
$ gcc -Wall -o err err.c

All of these show the output comes in two parts: first "foo", then "bar\n":

$ ./err 
$ ./err 2>&1 | cat 
$ ./err 2>file & for x in {1..8}; do ls -l file ; sleep 1; done

tested on Debian 9.4, libc6 version 2.24-11+deb9u3