Disorganize the number of file lines under Linux (arrange in random order)

 

 

awk 'BEGIN{srand()}{b[rand()NR]=$0}END{for(x in b)print b[x]}' inputFile >shuf_kmm

 

while read i;do echo "$i $RANDOM";done<inputFile|sort -k2n|cut -d" " -f1

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324746833&siteId=291194637