You're replying to a comment by lava.

lava Permalink
August 23, 2012, 15:10
> $ exec 2>file
> $ command1
> $ command2
> $ ...

This will look rather like:

| exec 2>file

Because prompt is being printed to stderr as well as commands which you gonna type will be echoed to the stderr too; and only stdout will be printed to the terminal.

Though, this way of exec-redirection is great for scripts.

Also, if this can matter for someone:

<<< 'input'

is a clear bash-ism and I heard about &> being not very reliable for defferent shells either.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "browser_329": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.