On , I learnt ...

You can use shuf to take random samples of lines

For example, I wanted to share a random sample of accounts affected by some issue based on a Loggly event export. This can be done with:

cat loggly_events.json | jq -r '.events[].event.json.account' | shuf -n20

More info in this short shuf tutorial.