#!/bin/sh FILE=/home/user/scripts/taglines.txt awk 'BEGIN { srand() } { l[NR]=$0 } END { print l[int(rand() * NR + 1)] }' "$FILE"