-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Got "tr: Illegeal byte sequence error" on step 6 in the readme (OSX 12.2.1 Monterey):
aws cloudformation create-stack --stack-name rds-s3 --template-body file://rds_s3.yaml --capabilities CAPABILITY_NAMED_IAM --parameters ParameterKey=BucketName,ParameterValue=$(head /dev/urandom | tr -dc a-z0-9 | head -c10)
Adding LC_ALL=C before tr corrects this:
aws cloudformation create-stack --stack-name rds-s3 --template-body file://rds_s3.yaml --capabilities CAPABILITY_NAMED_IAM --parameters ParameterKey=BucketName,ParameterValue=$(head /dev/urandom | LC_ALL=C tr -dc a-z0-9 | head -c10)
I'm not sure how this impacts the command on other operating systems or I'd propose a PR. See comments on accepted answer here: https://unix.stackexchange.com/questions/45404/why-cant-tr-read-from-dev-urandom-on-osx