nodejs 下post代码

2 个评论
var options = { host: 'www.yourdomain.com', post: 80, method: 'POST', path: '/', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': params.length } }; var request = http.request(options, function(response) { response.setEncoding('u...
2011-10-18 / 未分类 / 32 views浏览
阅读全文

Linux 下批量替换的命令

0 个评论
将下面的代码放到一个shell文件a.sh里, sed -i “s/$2/$3/g” `grep -rl $2 $1` 然后执行: sh a.sh path param1 param2 path是路径名, param1是要替换的内容 param2是替换后的内容
2011-10-18 / Shell / 16 views浏览
阅读全文