终于做完了多到变态又毫无意义的数据库作业。
好了,贴些代码,忘记所有的不快。
上次我用emacs写点点博客时候用两个bash脚本,然后干脆修改一下,合并成一个,代码如下
#!/bin/bash
self="$0"
pushd "$(dirname -- $self)">/dev/null
ddlog()
{
#username pwds out_cookie_file
curl -c $3 http://www.diandian.com/login -d "account=$1&password=$2&persistent=1"
}
ddgetfrmkey()
{
#cookiefile bgaddr out_put_ddfrmkey
curl http://www.diandian.com/dianlog/$2/new/text -b ...