On Mon, May 28, 2012 at 10:04 AM, John Kearney
<address@hidden> wrote:
Am 28.05.2012 08:50, schrieb Pierre Gaston:
On Mon, May 28, 2012 at 9:40 AM, John
Kearney
<address@hidden>
wrote:
#!/bin/bash
if ! [ -t
1 ]; then
exec
3>&1
exec
1>$(tty)
fi
doing this
1>&-
will close &3 as well.
it won't close 3 why would it? When you duplicate 1 you
also close 1 anyway.
I read it somewhere and at the time it seemed correct. Anyway its
redundant in the above example anyway?
Yes, you don't need to close it first.