一点shell好玩的东东

http://www.groad.net/bbs/simple/?t3699.html
http://www.2cto.com/os/201107/98279.html
http://hi.baidu.com/honstdw/item/43f724c01a675354bcef69c3
http://blog.csdn.net/sosodream/article/details/5683515 shell子进程相关

curl post
curl -d "content=xxx"默认url-encoded编码,servlet端可以通过req.getParameter("content")方式读取
-H可显示指定编码方式,等同于-F参数,如:
curl -H "Content-Type:application/xml" -d "$content" $url

父进程的标准输出、输入默认传给子进程,子进程可能会卡标准输出,可通过命令后跟2>/dev/null方式将标准输出弃置。

nohup sh `pwd`/hooks/collie-sql-review.sh $oldrev $newrev $refname 2>/dev/null 1>/dev/null &

猜你喜欢

转载自youngphy.iteye.com/blog/1767016