Dear LKBrwnDBA,
Thank you very much for your efforts.
After posting the query, I got to know the command "shuf" which is quite handy and does not require to set up the seed. But yours is more instructive in that one can learn more about programming from reading the codes.
Cheers
Dear all,
Shuffling the lines
I would like to perform the following tasks using awk. I would be grateful for any advices you might have.
1. Shuffle the lines by field 1 (groups 111, 112). That is, within each group shuffling is undertaken independently.
2. After that print out the first 5...
Further to my problem posted earlier, I have not mentioned that a same control can serve to different case. That is, for example, after a control is chosen for a case for code a, that same control can then serve subsequently as a control to another case provided that both agedays and sex fields...
Dear all,
Matching fields with random selection
I like to do the following matching and would be very grateful if someone would be able to provide a script file for doing this. Since the input dataset is quite large in order of millions of lines, it is almost impossible to upload into a...
Dear all,
I would like you have your advice on how to generate the following pattern of sequence numbers using awk.
Input
2
4
3
Output
2
1
4
3
2
1
3
2
1
Thanks in advance
Tivona
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.