清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
fy(){ result=`curl -s \ "http://dict.youdao.com/fsearch?q=$1"`; #pronounce echo $result | sed -r -n 's/.*<phonetic-symbol>([^<]+)<\/phonetic-symbol>.*/\1/p'; echo '--------------------' #translation echo $result \ | sed 's/^.*<custom-translation>//' \ | sed 's/<\/custom-translation.*$//' \ | sed 's/\]\]>/>\n/g' \ | sed -r -n 's/.*CDATA\[([^>]+)>/\1/p'; return 0; } 用法:保存到.bashrc后,命令行输入`fy hello`