shell 编程备忘
一、设置调试选项 set -x 二、tr命令temp.txt 内容:aaaabcdfdfdfdasa
>cat temp.txt | tr"" ""
>AAAAbcdfdfdfdAsA
>cat temp.txt | tr-s ""
>abcdfdfdfdasa
>cat temp.txt | tr-d ""
>bcdddds
三、变量赋值
answer=`echo $answer | tr `
answer=`echo $answer | tr "" ""`
页:
[1]