Last active
October 29, 2020 11:37
-
-
Save telatin/3ddfd39ebfdf2342183aea34f4d04ee2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
EXT='fastq.gz' | |
USER=ftp-username | |
PASS=ftp-password | |
HOST=ftp.host | |
REMOTEDIR=uploads/ | |
# see "-z" to try to resume transfers | |
#ncftpput -u "$USER" -p "$PASS" "$HOST" "$REMOTEDIR" *.$EXT | |
for FILE in *.$EXT; | |
do | |
if [ ! -e "$FILE.done" ]; then | |
ncftpput -u "$USER" -p "$PASS" "$HOST" "$REMOTEDIR" "$FILE" && touch $FILE.done | |
else | |
echo "Skipping $FILE" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment