Skip to content

Instantly share code, notes, and snippets.

@mychaelstyle
Created May 22, 2018 14:14
Show Gist options
  • Save mychaelstyle/6a5bf31cae6a94876aebccedc4647fe2 to your computer and use it in GitHub Desktop.
Save mychaelstyle/6a5bf31cae6a94876aebccedc4647fe2 to your computer and use it in GitHub Desktop.
Create random data bash
#!/bin/bash
filename="sampledata.csv"
rmax=5000
pmax=150
echo "" > $filename
for ((i=0; i < $rmax; i++)); do
row="${i},"
for ((j=0; j < $pmax; j++)); do
row="$row$(($RANDOM % 50)),"
done
echo $row
echo $row >> $filename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment