title: Syntax error: word unexpected (expecting "in")
body: <p>i'm writing a script but get the error : Syntax error: word unexpected (expecting "in")
  I don't really see where the error could be</p>
  
  <pre><code>#!/bin/bash
  for dir in "$@"
  
  do
  
  mv "$dir"/* /tmp
  
  done
  
  if [ $# -lt 1 ] ; then
  
  echo "ERROR: no argument"
  
  exit 1  # pas 0
  
  else
  
     case $#
  
     -d) mv -R $dir/* /tmp        
         ;;
  
  -x) find -executable -type f | xargs mv -t "$dir"/* /tmp
  
  ;;
  
  esac
  
  fi
  </code></pre>