Skip to content

Instantly share code, notes, and snippets.

@obar1
Created December 5, 2016 09:43
Show Gist options
  • Select an option

  • Save obar1/c14545a15a93ed42b1f7a569f778e490 to your computer and use it in GitHub Desktop.

Select an option

Save obar1/c14545a15a93ed42b1f7a569f778e490 to your computer and use it in GitHub Desktop.
# some tgz with random data
#!/bin/bash
for year in `seq 2013 2015`;
do
for month in `seq 1 12`;
do
mkdir $year-$month
echo $RANDOM > $year-$month/ratings.tsv
if [ -s $year-$month/ratings.tsv ]; then
tar czf $year-$month.tar.gz $year-$month/
fi
rm -rf $year-$month/
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment