This website requires JavaScript.
Explore
Help
Sign In
midfavila
/
awk
Watch
1
Star
0
Fork
You've already forked awk
0
Code
Issues
Pull Requests
Projects
Releases
1
Wiki
Activity
master
awk
/
testdir
/
t.randk
14 lines
107 B
Plaintext
Raw
Permalink
Blame
History
{
k = 2
n = NF
i = 1
while ( i <= n ) {
if ( rand() < k/n ) {
print i
k--
}
n--
i++
}
}
Reference in New Issue
View Git Blame
Copy Permalink