1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-18 21:14:11 +01:00

moved from ./Functions/Misc/randline

This commit is contained in:
Sven Wischnowsky 2001-04-02 12:27:23 +00:00
parent 440abd8aea
commit 80793a66dc

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