for file in $( ls 048033* ) ; do
if [ -s $file ]; then
arr[l]=$file
fi
I=$((I + 1))
done
Il giorno 07 febbraio 2012 11:13, Artini Alessio <
[email protected]> ha scritto:
> Salve a tutti,
> scusate l'OT ma sto avendo difficoltà a realizzare lo script
> trasferimento.sh:
>
> ---------------------------------------------------------------------
> #!/bin/bash
>
> WORKINGDIR="/tmp/"
> STORICO="/data/medici"
> HOST='xxx.yyy.zzz.ttt'
> USER='utente'
> PASSWD='passsssssssssword'
>
> #mi sposto nella cartella di lavoro/salvataggio dei file generati
> cd $WORKINGDIR
>
> declare -a arr
> I=0
>
> for file in $( ls 048033* ) ; do
> if [ -s $file ]; then
> arr[i]=$file
> fi
> I=$((I + 1))
> done
>
> ELEMENTS=${#arr[@]};
>
> if [ $ELEMENTS -gt 0 ]; then
> ftp -nv $HOST << CMD_SCRIPT
> user $USER $PASSWD
> ascii
> prompt
> mput 048033*.txt
> bye
> CMD_SCRIPT
> fi
> ---------------------------------------------------------------------
>
> Se lo eseguo ottengo:
> ./trsferimento.sh: line 56: syntax error: unexpected end of file
>
> Se commento l'IF finale l'errore scompare ma dove sta questo errore?
>
> Grazie a tutti
>
>
> Alessio Artini
>
>
> --
> Per REVOCARE l'iscrizione alla lista, inviare un email a
> [email protected] con oggetto "unsubscribe". Per
> problemi inviare un email in INGLESE a [email protected]
>
> To UNSUBSCRIBE, email to [email protected]
> with a subject of "unsubscribe". Trouble? Contact
> [email protected]
> Archive:
> http://lists.debian.org/E131A00A587E1A47ACB9531033151C810179D951@ntsvr02.pontassieve.local
>
>
--
esta es mi vida e me la vivo hasta que dios quiera