[kwlug-disc] Capturing output in scripts

Giles Malet gdmalet at gmail.com
Tue Aug 26 05:47:00 EDT 2014


On 14-08-21 03:27 PM, William Park wrote:
>
>      exec [...] 2>&1 1>/tmp/logfile

Order is significant as this is evaluated left to right, so you need to 
redirect 1 before 2, else 2 is left pointing at what 1 *originally* was. 
Thusly:

exec 1>/tmp/logfile 2>&1

g





More information about the kwlug-disc mailing list