cat(1) now only uses "traditional" mode if both stdin and stdout isatty(2).

This commit is contained in:
Jonas 'Sortie' Termansen 2012-03-04 16:49:51 +01:00
parent ac7e55ffbd
commit 3c12de760f
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ int main(int argc, char* argv[])
return cat(argc, argv);
}
if ( !isatty(0) ) { return docat("<stdin>", 0); }
if ( !isatty(0) || !isatty(1) ) { return docat("<stdin>", 0); }
bool lastwasesc = false;