Script to display random one line tag aphorisms from a text file :-) Code: #!/bin/sh FILE=/home/user/scripts/taglines.txt awk 'BEGIN { srand() } { l[NR]=$0 } END { print l[int(rand() * NR + 1)] }' "$FILE" Sample Screenshot
#!/bin/sh FILE=/home/user/scripts/taglines.txt awk 'BEGIN { srand() } { l[NR]=$0 } END { print l[int(rand() * NR + 1)] }' "$FILE"