mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-02 00:41:44 +02:00
4 lines
82 B
Plaintext
4 lines
82 B
Plaintext
|
# get a random line from a file
|
||
|
integer z="$(wc -l <$1)"
|
||
|
sed -n $[RANDOM%z+1]p $1
|