Why sh failed 'Process Substitution'?

2009-06-09 Thread Pan ruochen
Hi All, Why sh failed to recognize Process Substitution, even if /bin/sh.exe is a copy of /bin/bash.exe? $cat test.sh #!/bin/bash A=A B=B diff (echo $A) (echo $B) $sh test.sh a.sh: line 4: syntax error near unexpected token `(' a.sh: line 4: `diff (echo $A) (echo $B)' -- Unsubscribe info:

Re: Why sh failed 'Process Substitution'?

2009-06-09 Thread Dave Korn
Pan ruochen wrote: Hi All, Why sh failed to recognize Process Substitution, even if /bin/sh.exe is a copy of /bin/bash.exe? $cat test.sh #!/bin/bash A=A B=B diff (echo $A) (echo $B) $sh test.sh a.sh: line 4: syntax error near unexpected token `(' a.sh: line 4: `diff (echo $A) (echo $B)'

Re: Why sh failed 'Process Substitution'?

2009-06-09 Thread Daniel B.
Dave Korn wrote: Pan ruochen wrote: Hi All, Why sh failed to recognize Process Substitution, even if /bin/sh.exe is a copy of /bin/bash.exe? $cat test.sh #!/bin/bash A=A B=B diff (echo $A) (echo $B) $sh test.sh a.sh: line 4: syntax error near unexpected token `(' a.sh: line 4: `diff (echo $A)

Re: Why sh failed 'Process Substitution'?

2009-06-09 Thread Mark J. Reed
Pan ruochen wrote: Why sh failed to recognize Process Substitution, even if /bin/sh.exe is a copy of /bin/bash.exe? It's very common in UNIXland for a program to change its behavior depending on the name by which it is invoked. ln, mv, and rm are often links to the same command; there's at