title: "find: bad option -name "*.user"" while passing variables to find
body: <p>In a bash script this fails:</p>
  
  <pre><code>fileloc='/var/adm/logs/morelogs'
  filename=' -name "*.user"'
  
  fileList="$(find "$fileloc"/* -type f -prune "$filename" -print)"
  
  
  find: bad option  -name "*.user"
  find: [-H | -L] path-list predicate-list
  </code></pre>
  
  <p>but this works:</p>
  
  <pre><code>find /var/adm/logs/morelogs/* -type f -prune -name "*.user" -print
  </code></pre>
  
  <p>in the same  manner:
  this fails:</p>
  
  <pre><code>fileloc='/var/adm/logs/morelogs'
  filename='\( -name "admin.*" -o -name "*.user" -o -name "*.user.gz" \)'
  
  fileList="$(find "$fileloc"/* -type f -prune "$filename" -print)"
  
  
  find: bad option  \( -name "admin.*" -o -name "*.user" -o -name "*.user.gz" \)
  find: [-H | -L] path-list predicate-list
  </code></pre>
  
  <p>but this works:</p>
  
  <pre><code>find /var/adm/logs/morelogs/* -type f -prune \( -name "admin.*" -o -name "*.user" -o -name "*.user.gz" \) -print
  </code></pre>
  
  <p>GNU bash, version 3.00.16(1)-release-(sparc-sun-solaris2.10)</p>