View Single Post
Posts: 59 | Thanked: 168 times | Joined on Mar 2010 @ Finland
#581
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
Attached Images
 
 

The Following 5 Users Say Thank You to jpel For This Useful Post: