AnonymousNamefag

randline.awk

Dec 24th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 0.14 KB | None | 0 0
  1. #!/usr/bin/awk -f
  2.  
  3. BEGIN { idx = 0 }
  4. $0 !~ /^\r*$/ { array[++idx] = $0 }
  5. END { srand()
  6.       r = int( rand() * idx )
  7.       print array[r] }
Add Comment
Please, Sign In to add comment