You're replying to a comment by Samus_.

September 06, 2012, 18:49

hi Peteris, great article! I'd like to add something regarding point 12, you can also do it with braces like this:

    $ { command1; command2; } >file

which avoids the subshell (performance) and also allows you to modify vars within the context of the executing script, subshells can't do that.

the subshell is useful precisely when you want to modify the environment but just within that context, you no longer need to restore the original values after you're done.

by the way, I'm preparing a talk for some friends regarding redirections and I'd like to use some material from here, I'll cite you as a source but if you prefer not to be included please let me know.

thank you.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

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

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