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
#!/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
 
     
    