title: Unix script for loop find error --- find: paths must precede expression
body: <p>I am formulating the script so that for loop automates with the find command.
  I am getting the error "find: paths must precede expression"</p>
  
  <pre><code>++ find alogic/batch/Instrument b/Instrument/Bank b/Instrument/container \
          b/Instrument/Authorize b/Instrument/Common b/Instrument/Confirm \
          -type d -type d '\(' -path alogic/batch/Instrument/BuyerCredit \
          -o -path alogic/batch/Instrument/DebitCard '\)' -prune -o -name \
          '*.cpp' -print
  find: paths must precede expression
  </code></pre>
  
  <p>eg:</p>
  
  <pre><code>inclusive_directories =  alogic/batch/Instrument b/Instrument/Bank b/Instrument/container b/Instrument/Authorize b/Instrument/Common b/Instrument/Confirm
  
  exclusive_unix_notation=
     -type d \( -path alogic/batch/Instrument/BuyerCredit -o -path alogic/batch/Instrument/DebitCard \)
  </code></pre>
  
  <h3>Scripts</h3>
  
  <pre><code>for directory in `echo "$APPLOGIC_EXCLUSIVE" "$BIZ_EXCLUSIVE" "$PACKAGE_EXCLUSIVE" "$PIMP_EXCLUSIVE" "$OTHER_EXCLUSIVE"`
  do
      if [[ -d "$directory" ]]; then
          #intially
          if [[ "$exclusive_unix_notation" == "" ]]; then
              exclusive_unix_notation=" -type d \( -path $directory"
          else
              exclusive_unix_notation="`echo $exclusive_unix_notation` -o -path $directory"
          fi
      fi
  done
  #if processed succesfully added the close brace
  if [[ "$exclusive_unix_notation" != "" ]]; then
      exclusive_unix_notation="`echo $exclusive_unix_notation` \) "
  fi
  
  # generate cpp files with files to be excluded
  for files in `find $inclusive_directories $exclusive_unix_notation -prune -o -name "*.cpp" -print`
  do
      if [[ -f "$files" ]]; then
           echo "$files"
      fi
  done | sed 's#^\./##' | sed 's/.cpp/.o/' | sort &gt; $OBJ_LIST
  
  exit;
  </code></pre>