export SYSTEM_SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) echo "SYSTEM_SECRET is $SYSTEM_SECRET"
@(48..57 + 65..90 + 97..122) | Get-Random -Count 32 | ForEach-Object -Begin {$secret = ''} -Process {$secret += [char] $PSItem} -End {$env:SYSTEM_SECRET = $secret; Write-Host "SYSTEM_SECRET is $secret"}
tr -dc A-Za-z0-9_ < /dev/urandom | head -c 32
?
And yes the "cat" is not necessary.