cat test2.html | sed -e 's/\(^\|[^0-9]\)\(13[0-9][0-9]\{8\}\|14[579][0-9]\{8\}\|15[0-3,5-9][0-9]\{8\}\|16[6][0-9]\{8\}\|17[0135678][0-9]\{8\}\|18[0-9][0-9]\{8\}\|19[89][0-9]\{8\}\)\($\|[^0-9]\)/\nfind_phone:\2\n/g' | sed -e 's/\(^\|[^0-9]\)\([0-9]\{6
public class Demo { public static void main(String[] args) { String sql1 = "use test;select * from default.abc where dt='abc;faf;fff' and ct=\"2012;43\" ; "; sql1 = "select * from aaa where dt= '20 ;12; 34;3' AND name='fafae; fa ;
.巧用bash的{}扩展备份目录: cp file.txt{,.bak} .利用at执行一次性命令: echo "ls -l" | at midnight #Execute a command at a given time .kill - 或者 kill -HUP 一般用来重新读取配置文件:(一般程序自己实现的) HUP 其实就是给个信号,你的程序可以根据这个信号做一些事情,比如reload进程,或者是rotota日志.例如 squid.Nginx.xinetd. kill就是发送一
grep命令可以检索文件中包含关键字(可以使用正则)的行,默认区分大小写. ubuntu@ubuntu:~/test$ cat test.txt this is linux this is Linux this is mysql this is Mysql ubuntu@ubuntu:~/test$ grep 'linux' test.txt this is linux ubuntu@ubuntu:~/test$ grep 'Mysql' test.txt this is Mysql ubunt