After using `exec 1>file`, how can I stop this redirection of the STDOUT to file and restore the normal operation of STDOUT?

后端 未结 4 1131
灰色年华
灰色年华 2020-12-14 13:04

I am a newbie in shell scripting and I am using Ubuntu-11.10. In the terminal after using exec 1>file command, whatever commands I give to terminal, its outp

4条回答
  •  难免孤独
    2020-12-14 14:05

    While I completely agree with Jonathan's Q1, some systems have /dev/stdout, so you might be able to do exec 1>file; ...; exec 1>/dev/stdout

提交回复
热议问题