xargs 与 tr, sort uniq

sort -nrk 2,3   date.txt  按数字,逆序, 第二、三列排序


sort -z data.txt 输出以 \0 结尾的

sort  data.txt | uniq 



echo "abc" | tr 'a-z' 'A-Z' 转大写

echo  "abc1324"  |  tr  -d '0-9'  删除数字

 echo aasbaswr3233 | tr -d -c 'a-z'   删除a-z的补集,只保留小写字母


[root@localhost ~]# echo "a:b:c" | xargs -d   ':'

a b c


-print0 原本打印的换行,打印成 '\0';  -0表示以 \0作为定界符

find . -name "*.log" -print0 | xargs -0 rm -f



猜你喜欢

转载自blog.csdn.net/konga/article/details/49967273