Created
March 13, 2020 07:52
-
-
Save ryu1/4de461084d93cacf48489fa144145815 to your computer and use it in GitHub Desktop.
This script can generate dummy CSV file.
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/bash | |
echo `date`" start" | |
for i in `seq 0 7000000` | |
do | |
year=$((RANDOM%8+2012)) | |
month=$((RANDOM%12+1)) | |
day=$((RANDOM%29+1)) | |
hour=$((RANDOM%24)) | |
min=$((RANDOM%60)) | |
sec=$((RANDOM%60)) | |
ms=$((RANDOM%1000)) | |
date="$(printf "%04d" ${year})-$(printf "%02d" ${month})-$(printf "%02d" ${day}) $(printf "%02d" ${hour}):$(printf "%02d" ${min}):$(printf "%02d" ${sec}).$(printf "%03d" ${ms})" | |
echo "$i,$date,dummy" >> ./temp.txt | |
done | |
echo `date`" end" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment