awk 'BEGIN{10000*srand();} {printf "%s %s\n", rand(), $0}' t | sort -k1n | awk '{gsub($1FS,""); print $0}'
Linux下文件随机打乱乱序
Leave a reply
awk 'BEGIN{10000*srand();} {printf "%s %s\n", rand(), $0}' t | sort -k1n | awk '{gsub($1FS,""); print $0}'