Sorry my inglis This scripts when I use it manually works ok But when I use it with cron it gives me the following error
cron log .. 1: Syntax error: "(" unexpected
cat scripts.sh
forexcludes2=()
for f in "${EXCLUDE[@]}"
do
forexcludes2+=(--exclude "$f")
done
ORIGEN=/var/www1
DESTINO=/var/www2
do_200_ej_local_local_dir () {
do_fecha
sudo rsync "${OPTIONES[@]}" "${forexcludes2[@]}" "$ORIGEN/" $DESTINO
}
OPTIONES=(
-A
-S
-avr
)
EXCLUDE=(
log/
LOG/
archivos/
*.tar.gz
*.tar.gz
*.zip
*.tar.bz2
)
do_200_ej_local_local_dir ```
Any idea ?
Thank