title: Syntax error: "(" unexpected (expecting "fi")
body: <p>Error messages:</p>
  
  <pre><code>Syntax error: "(" unexpected (expecting "fi")
  /sbin/modprobe.sh: 2: /sbin/modprobe.sh: EOF: not found
  /sbin/modprobe.sh: 10: /sbin/modprobe.sh: Syntax error: "(" unexpected (expecting "fi")
  </code></pre>
  
  <p>Shell script:</p>
  
  <pre><code>EOF
  #!/bin/bash
  
  if [[ \$1 == -l ]]
  then
  
  if [ -z \$2 ]    
  then
  find /lib/modules/\$(uname -r) -name '*.ko' | sed -e "s#\\/lib\/modules\/\$(uname -r)\/##g"
  else
  find /lib/modules/\$(uname -r) -name '*.ko' | sed -e "s#\/lib\/modules\/\$(uname -r)\/##g" | grep \$2
  fi
  
  else
  /sbin/modprobe \$@
  fi
  EOF
  </code></pre>