【Shell】将txt中内容乱序May 16, 2017#Shell17AI-generated summaryThis is a Shell command to shuffle the contents of a txt file for training purposes. It uses awk, sort, and cut to randomize the order of the lines in the file. shuffle 训练集目录用 Copycat in.txt | awk 'BEGIN{srand()}{print rand()"\t"$0}' | sort -k1,1 -n | cut -f2- > out.txt 000