[clug] shell stdout and stderr
Kim Holburn
kim.holburn at anu.edu.au
Thu Dec 1 06:14:53 GMT 2005
Except I like Peter's solution best.
On 2005 Dec 01, at 4:56 PM, Kim Holburn wrote:
>
> On 2005 Dec 01, at 4:10 PM, Tony and Robyn Lewis wrote:
>
>> David Gibson wrote:
>>
>>> exec > stdout.out 2> stderr.out
>>>
>>> i.e. the "exec" shell builtin without specifying a command to exec
>>> will apply the given redirections to the current shell.
>>>
>> Damn. Kim was right. Shared points to David and Kim.
>>
>> Now, next question, is how to cancel that redirection and get
>> stdout going back to my terminal. Clues?
>
> I *think* the simplest way is to use a sub shell. Gets around all
> those save environemt - mess it up - restore things:
>
> stuff
> stuff
> (
> exec > ...
> stuff
> )
> # back to old environment.
>
> Could be wrong here though.
>
>>
>> Tony
>>
>>
>> --
>> linux mailing list
>> linux at lists.samba.org
>> https://lists.samba.org/mailman/listinfo/linux
>
> --
> Kim Holburn
> Security Manager, National ICT Australia Ltd.
> Ph: +61 2 61258620 M: +61 417820641 F: +61 2 6230 6121 aim://
> kimholburn
> Email: kim.holburn at anu.edu.au - PGP Public Key on request
> callto://kholburn
> Cacert Root Cert: http://www.cacert.org/index.php?id=16 -> http://
> www.cacert.org/cacert.crt
> Aust. Spam Act: To stop receiving mail from me: reply and let me know.
>
> Use ISO 8601 dates [YYYY-MM-DD] http://www.saqqara.demon.co.uk/
> datefmt.htm
> Democracy imposed from without is the severest form of tyranny.
> -- Lloyd Biggle, Jr. Analog, Apr 1961
>
>
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
--
Kim Holburn
Security Manager, National ICT Australia Ltd.
Ph: +61 2 61258620 M: +61 417820641 F: +61 2 6230 6121 aim://kimholburn
Email: kim.holburn at anu.edu.au - PGP Public Key on request callto://
kholburn
Cacert Root Cert: http://www.cacert.org/index.php?id=16 -> http://
www.cacert.org/cacert.crt
Aust. Spam Act: To stop receiving mail from me: reply and let me know.
Use ISO 8601 dates [YYYY-MM-DD] http://www.saqqara.demon.co.uk/
datefmt.htm
Democracy imposed from without is the severest form of tyranny.
-- Lloyd Biggle, Jr. Analog, Apr 1961
More information about the linux
mailing list