tr 用法
1.tr string1 string2
替换正则表达式string2替换strin1
echo 'hello' | tr 'ho' 'ab'
aellb
2. tr -d string1
删除匹配string1正则的字符
echo 'hello123test' | tr -d '0-9'
hellotest
3. tr -s
tr -s string1
将匹配到的重复字符串用单个字符串替换
echo "helll" |tr -s 'l'
hel
tr -s string1 string2
重复的string1 替换成string2
echo "helll" |tr -s 'l' 'x'
hex