Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 665

Comment by Kamil Maciorowski on Redirecting standard output AND standard error in bash

$
0
0
(1) Maybe these times there were no errors. How do you know? (2) Do not use 1>soutanderror.text 2>soutanderror.text for writing to the same regular file. This syntax opens the file twice, each instance will use its own writing position. In effect data written to stderr will overwrite data written to stdout (and/or the other way around, depending on the sequence of writes, their timing, buffering and such). For comparison: 2>&1duplicates the descriptor, there will be a common writing position, this is the right way.

Viewing all articles
Browse latest Browse all 665

Trending Articles