in reply to sh: -c: line 0: syntax error near unexpected token `('

Compare FOO=... to $FOO=.... First one assigns to a variable, the latter will expand variable, =, ... parts, then attempt to execute the result.

In other words, be mindful of where you put the $.

  RT_DiffFiles=`comm -23 <(sort $RT_64OG_FilesPath) <(sort $RT_64_FilesPath)`;
  echo "$RT_DiffFiles";

Are you trying to rewrite this as perl code?
  • Comment on Re: sh: -c: line 0: syntax error near unexpected token `('