Skip to content

Instantly share code, notes, and snippets.

@catichenor
Created March 3, 2023 19:10
Show Gist options
  • Save catichenor/abdc1f3a221440811b599c26d8fe8220 to your computer and use it in GitHub Desktop.
Save catichenor/abdc1f3a221440811b599c26d8fe8220 to your computer and use it in GitHub Desktop.
Wait for a download to complete and send it on its way
#!/bin/bash
DLFILE=/path/to/file.zip
while [ ! -f $DLFILE ];
do
echo "`date --rfc-3339=seconds`: Not here yet"
sleep 60
done
echo "`date --rfc-3339=seconds`: It's here! Moving..."
mv $DLFILE '/path/to/destination/' # Move from download location to final destination
echo "`date --rfc-3339=seconds`: Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment