Please use
[code][/code] tags around your code and data, to preserve formatting and to improve readability. Please do not use quote tags, colors, or other fancy formatting.
bash has a built-in
RANDOM environment variable, BTW, so unless you need industrial-strength randomness you can remove the complex external command.
You can also re-seed RANDOM at any time by simply setting it to any string e.g.
Code:
RANDOM=$( date '+%s' )
Edit: I just remembered this as well:
This will output four random lines from the file.
Edit2: And if you want to stick with the script, use this to print a line number instead of
head+tail:
Code:
sed -n "${LINE}p" wordlist