mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-08 08:40:57 +01:00
3 lines
80 B
Text
Executable file
3 lines
80 B
Text
Executable file
# get a random line from a file
|
|
integer z=$(wc -l <$1)
|
|
sed -n $[RANDOM%z+1]p $1
|