in

historyOfOneTextFile

historyOfOneTextFile | try-memes, random-memes, IT-memes, mac-memes, feature-memes | ProgrammerHumor.io
try-memes, random-memes, IT-memes, mac-memes, feature-memes | ProgrammerHumor.io

[text] 2 Answers Active Oldest Votes 4. Use shuf withthe n option as shown below o get N randorn ines shuf n N input output shar improve tis answer folow osted dun 16 16.1 2048 answored Fob 2513 at 1103 N DomainsFeatured dogbane B 123401 18 020 26k 269 351 388 5 This should be the accepted answer. Wow shufis 5000 ast. picking 10000 random nes from a textfle with 40000 lines is instant. Trying to use sortR 100k s0 long just CTRLC it carpii Jui 315 2 2010 2 1fyou just need a random s of lines not i a random order then shuf is very nefficent for big file beter is t0.do reservoir sampling as in this answer. petrelharp Sep 6 15 ot 2324 4 neither shuf nor sort R are avalable for mac OSX. any suggestons Tom Smith Oct 15 at 1005 TomSmith On Mac OSX ifyou are using Homebrew you can get shuf or GNU sort by installing coreutils More info here 14 xnofinator Oct815at 1311 7 shuf s fantastc. red in on a 78 Blion fine text fileand it did the job in less than 1 minute. Ash Jan 1916 ate13 shufis fantastic. ried in on a 78 Billion line text file and it did the job in less than 1 minute. Ash Jan 1916 a813 1 78 Billion line text file