Created
April 20, 2017 06:48
-
-
Save trajakovic/0896409d009ff83a682265e57256d5c9 to your computer and use it in GitHub Desktop.
Generate binary files with random content...and calculate their sha256
This file contains 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 | |
#size magnitude | |
sizes=( "" "K" "M" ) | |
for magnitude in "${sizes[@]}"; do | |
for size in `seq 1 5 51`; do | |
echo "Generating ${size}${magnitude}" | |
head -c ${size}${magnitude} </dev/urandom >file-${size}${magnitude}.bin | |
done | |
done | |
#generate sha256checksums | |
rm -f sha256checksums | |
find . -name "*.bin" -type f -exec sha256sum "{}" + > sha256checksums |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment