find /run -type f -name "*.pid" -exec grep -l 541 {} \;
查找/run目录下进程号为541的pid文件
find . -type f -name "*.yaml" | xargs perl -pi -e 's|172.16.0.15|172.16.0.172|g'
检索当前目录下所有.yaml格式文件,并将其中的ip地址由172.16.0.15 替换为 172.16.0.172
sed -i 's/\r$//' <filename>
替换文件中\r为空,windows下的回车符为\n\r,linux下为\n,在脚本开发的过程中会遇到’\r’: command not found错误