I have searched online and use the following bash script (test.sh) to sort files from the directory with assigned random seeds:
#!/bin/bash
get_seeded_random()
{
seed="$1"
openssl enc -aes-256-ctr -pass pass:"$seed" -nosalt \
</dev/zero 2>/dev/null
}
ls |sort -R --random-source=<(get_seeded_random $1)
When I run:
./test.sh 405
I got:
sort: /dev/fd/63: end of file
The bash --version i am using is GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Could some one help me here? it seems to work fine for me in another container where the bash --version is GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)