Randomly shuffle the contents of the first argument and write it to the second argument, then sort the second argument by the second column and convert all characters in the third argument to lowercase.
shuf -ez 'echo \"$1\" > $2; sort -ck 2 $2; tr '[:upper:]' '[:lower:]' < $3'