Created
January 3, 2019 19:23
-
-
Save colehocking/a6ee02cd58260d1ecc80c8d43ecd1469 to your computer and use it in GitHub Desktop.
generate a random variable of length 0-10
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 | |
# Generate a random variable of length 0-10 | |
head -c 500 /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9~!@#$%^&*_-' | fold -w $((RANDOM%10)) | head -n 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment