Friday, May 1, 2009

关于mldonkey的两段小脚本

也可以写成alias.

1. 查看下载.我保存到/usr/local/bin/vd

#!/bin/bash
ORIGIN=$(mldonkey_command -u "username" -p "password" 'vd')
# remove the trash between head and tail XD
echo "$ORIGIN" | tail -n +2 | head -n -3  

2. 添加ed2k链接.我保存到/usr/local/bin/mladd
#!/bin/bash
if [ $# -gt 0 ];then
    mldonkey_command -p "admin" "$1" | tail -n +2 | head -n -3
else
    echo "usage: mladd <ED2K_link>"
fi

over~

#END

No comments: