perl终端输出带颜色
发布于: 2016-12-31 11:22分类: perl
perl -MTerm::ANSIColor -e "print color 'bold red';print 'hello';print color 'reset';" perl -MTerm::ANSIColor -e "print color 'bold red';print \"no match\t$LINE\";print color 'reset';"
批量替换 可用sed实现
perl -pi -e 's/ado_link\(/&ado_link\(/g' `find ./ -type f -a -name "*.php"`
perl -pi.bak -e 's/&\s*ado_link\(/ado_link\(/g' *.php