1 Star 0 Fork 0

董楠 / shell-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
youdao.sh 423 Bytes
一键复制 编辑 原始数据 按行查看 历史
董楠 提交于 2016-05-28 17:50 . 调整输出
#!/bin/bash
word=$1
if [ $# -lt 1 ]
then
echo '请输入要查的单词:'
read word
else
echo " \"$word\""
fi
curl -m 5 -s -e "http://m.youdao.com/dict" -A "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36" -H "m.youdao.com" "http://m.youdao.com/dict?le=eng&q=$word" | perl -n -e '/<li>([^<]*)<\/li>/ && print " $1\n"'
1
https://gitee.com/dongnan/shell-tools.git
git@gitee.com:dongnan/shell-tools.git
dongnan
shell-tools
shell-tools
master

搜索帮助