Thread: add to path
View Single Post
  #4   (View Single Post)  
Old 18th August 2010
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

bare parens in sh-style languages generally mean run it in a subshell, or an error.

old idiomatic way: $ tar cf - . | (cd /somewhere; tar xf -)

is roughly a shortcut for: $ tar cf - . | sh -c "cd /somewhere; tar xf -"

the only time you should be seeing ( or ) in setting a path variable, is if you want to do something like $ PATH="$(pwd)/bin:$PATH"; export PATH.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote