#字典去重,并按照出现次数倒叙排序
cat 字典.txt |sort |uniq -c|sort -rn| head
#字典去重,并按照出现次数倒叙排序,并且去掉出现次数
cat 字典.txt |sort |uniq -c|sort -rn|awk '{print $2}'| head
#选择字典中长度小于等于4的密码,(这里+1的原因是,awk会把换行符也算进字符数里面)
cat 字典.txt |awk '{if (length($1)<=4+1) {print $1}}'
#选择字典中6-8位的密码
cat 字典.txt |awk '{if (length($1)>=6+1) {print $1}}' | awk '{if (length($1)<=8+1) {print $1}}'