I run this on an Ubuntu machine, so I'm not sure if this will work for you, but this is what I did:
$ exec 1>&0 $ exec 2>&0
Suddenly I had STDOUT and STDERR. Magic!
Explanation: By executing the following commands, we get the following output:
$ ls -l /dev/stdout lrwxrwxrwx 1 root root 15 Jun 11 23:39 /dev/stdout -> /proc/self/fd/1 $ ls -l /proc/self/fd/1 lrwx------ 1 jay jay 64 Jun 22 01:34 /proc/self/fd/1 -> /dev/pts/10 $ ls -l /proc/self/fd/ total 0 lrwx------ 1 jay jay 64 Jun 22 01:35 0 -> /dev/pts/10 lrwx------ 1 jay jay 64 Jun 22 01:35 1 -> /dev/pts/10 lrwx------ 1 jay jay 64 Jun 22 01:35 2 -> /dev/pts/10 lr-x------ 1 jay jay 64 Jun 22 01:35 3 -> /proc/12224/fd
Since all three fd points to the same thing, we can return them to their normal state by simply pointing to / dev / pts / 10, which exec 1>&0 and exec 2>&0 do
source share