1.tr - translate or delete characterside
[dmtsai@study ~]$ tr [-ds] SET1 ...spa
[root@localhost tmp]# cat tr.file 同步
[root@localhost tmp]# cat tr.file |tr "o" "O"ast
[root@localhost tmp]# cat tr.file |tr "[a-z]" "[A-Z]"
[root@localhost tmp]# cat tr.file |tr [0-9] [a-j]
google bba fbea #數字0-9用字碼a-j替換
[root@localhost tmp]# cat tr.file |tr -d " "
[root@localhost tmp]# cat tr.file |tr -s [a-zA-Z0-9]
[root@localhost tmp]# cat tr.file |tr -s "\n"
[root@localhost tmp]# cat tr.file |tr " " ":"
google:110:5140 #用:作分隔符,而再也不用空格