ls ${HUAWEI_ENTERPRISE_SERVER_ROOT}/lib/*.so | awk -F'/' '{print $NF}'
统计grep后的行数:
grep -i 'error' *.log | wc -l
关于find: -exec: no terminating ";" or "+"的处理:
http://compgroups.net/comp.unix.shell/find-exec-no-terminating-or-+
网上的回答是:
As it says: add ';' or '+' at the end of the find command (you'll get
slightly different outputs if you use one or the other). ";" is a special
character to the shell, so you need to either escape it like \; or quote it
like ';'
find * | xargs grep email
会吧有email字段的文件名和所在行打印出来
语言设置:LC_ALL="zh_CN.GBK"