mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
moved from ./Functions/Misc/randline
This commit is contained in:
parent
440abd8aea
commit
80793a66dc
1 changed files with 3 additions and 0 deletions
3
Functions/Example/randline
Normal file
3
Functions/Example/randline
Normal file
|
@ -0,0 +1,3 @@
|
|||
# get a random line from a file
|
||||
integer z="$(wc -l <$1)"
|
||||
sed -n $[RANDOM%z+1]p $1
|
Loading…
Reference in a new issue