On Fri, May 30, 2008 at 3:52 PM, michael shiloh
<[EMAIL PROTECTED]> wrote:
> I must have missed something here. Where is the script that is being run?

example:

#!/bin/sh

echo Before redirection
ls -l /proc/$$/fd/0
tty
exec < /dev/null
echo After redirection
ls -l /proc/$$/fd/0
tty

# rest of the script here...
exit 0

(tty tests the tty on its standard input)

>
> Michael
>
>
> On Fri, 30 May 2008, Amos Shapira wrote:
>
>> On Fri, May 30, 2008 at 2:33 PM, Shachar Shemesh <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> If you run "exec" without giving it a parameter, it will not execute
>>> anything, but the redirection will take effect.
>>>
>>> "exec < /dev/null >output 2>&1" will do what you want.
>>
>> Fantastic!
>>
>> Thanks to you and Yedidyah for the friendly reminder.
>>
>> --Amos
>>
>

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to