Re:Cronic - A cure for Cron's chronic email problem
by bodyfour on Friday May 25, 2012 @12:21AM
(#4021905)
Think of it as saying "take fd 2 (stderr) and send it to the same place fd 1 is going now" So:
first redirects fd=1 to file.txt and then has fd=2 go the same place. Where:
first has fd=2 go the original place stdout was and then redirect fd=1 only to file.txt. Usually not what you want. If you really wanted file.txt to get only the stdout while simultaneously sending what used to be stderr to stdout I think you'd have to use another file descriptor like:
That is, save the original stdout as fd=3, redirect stdout, then make stderr go the same place fd=3 is going.
[ Parent
| on HN ]
There are no comments on this comment yet.