Skip to content

Instantly share code, notes, and snippets.

@invkrh
Last active November 24, 2015 00:06
Show Gist options
  • Save invkrh/583fcf11234471cbd42c to your computer and use it in GitHub Desktop.
Save invkrh/583fcf11234471cbd42c to your computer and use it in GitHub Desktop.
#!/bin/bash
function gen {
year=$1
mon=$2
days=$3
for d in $(eval echo "{01..$days}")
do
for h in {00..23}
do
mkdir -p $year/$mon/$d
echo $year-$mon$d-$h > "$year/$mon/$d/$year$mon$d"_"$h.log"
done
done
}
for i in {2013..2015}
do
gen $i 01 31
gen $i 01 31
gen $i 02 28
gen $i 03 31
gen $i 04 30
gen $i 05 31
gen $i 06 30
gen $i 07 31
gen $i 08 31
gen $i 09 30
gen $i 10 31
gen $i 11 30
gen $i 12 31
done
aws s3 mv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment