Skip to content

Instantly share code, notes, and snippets.

@cloverstd
Created July 24, 2014 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloverstd/b7146bae2f4ff9d07085 to your computer and use it in GitHub Desktop.
Save cloverstd/b7146bae2f4ff9d07085 to your computer and use it in GitHub Desktop.
七牛批量下载
#!/bin/bash
key="infopush.debug.log.2014-07-"
suffix=".tar.gz"
for ((j=16; j<24; j++)); do
key_day=${key}${j}"-"
for ((i=0; i<24; i++)); do
if ((${i} < 10));then
key22="22/"${key_day}"0"${i}
key23="23/"${key_day}"0"${i}
else
key22="22/"${key_day}${i}
key23="23/"${key_day}${i}
fi
echo ${key22}${suffix}" downloading"
./qboxrsctl get uploadlog ${key22}${suffix} ${key22}${suffix}
echo ${key22}${suffix}" downloaded"
echo ${key23}${suffix}" downloading"
./qboxrsctl get uploadlog ${key23}${suffix} ${key23}${suffix}
echo ${key23}${suffix}" downloaded"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment