1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-04 06:14:50 +01:00
zsh/Functions/randline
1999-04-15 18:07:38 +00:00

3 lines
82 B
Text
Executable file

# get a random line from a file
integer z="$(wc -l <$1)"
sed -n $[RANDOM%z+1]p $1