Randomly select one word from the file /usr/share/dict/words, then search the file /etc/services for the last line, reverse it, and extract the text after the closing bracket.
shuf -n 1 /usr/share/dict/words | xargs -I{} sed -n 'p' /etc/services | sed -n '$p' | rev | xargs -I{} grep -oP '(?=])\s+.*$' {}