博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

做国内专业的Linux博客

追求完美Linux企业级解决方案-邮件服务器、ERP服务器、CRM服务器、HR服务器、CMS服务器、OA服务器、HA高可用、负载均衡、网格计算、入侵检测、性能优化、系统调优。
  gdlc.cublog.cn

关于作者
姓名:knight
职业:高级工程师/项目经理
位置:广东省linux中心
MSN :hsx918@hotmail.com
|| << >> ||
我的分类


ubuntu中星际译王字典下载脚本-强!
#! /bin/bash

# install stardict
if [[ -f $(which stardict) ]]
then
    echo ""
    echo "You have stardict installed."
    echo ""
    echo "Downloading dictionary files ... "
    echo ""
    sleep 3
else
    sudo apt-get install stardict -y
    echo "Now stardict has been installed."
    echo ""
    echo "Downloading dictionary files ... "
    echo ""
    sleep 3
fi

# Definations
passwd="ubuntu:ubuntuftp"
url="http://$passwd@ftp.ubuntu.org.cn/stardict.sourceforge.net"
dir="$HOME/.stardict/dic"

# 通用词典选有:21世纪双向,朗道,韦氏,牛津,朗文,计算机专业
dict_1="stardict-21shijishuangxiangcidian-2.4.2.tar.bz2"
dict_2="stardict-langdao-ce-gb-2.4.2.tar.bz2"
dict_3="stardict-langdao-ec-gb-2.4.2.tar.bz2"
dict_4="stardict-merrianwebster-2.4.2.tar.bz2"
dict_5="stardict-oxford-gb-2.4.2.tar.bz2"
dict_6="stardict-longman-2.4.2.tar.bz2"
dict_7="stardict-computer-2.4.2.tar.bz2"

if [ ! -d $dir ]
then
    mkdir -p $dir
fi

for dict in $dict_1 $dict_2 $dict_3 $dict_4 $dict_5 $dict_6 $dict_7
do
    wget -c $url/$dict -P $HOME && tar jxf $HOME/$dict -C $dir
    rm -rf $HOME/$dict
    echo ""
done

echo "Run 'stardict &' in terminal,enjoy it."
echo ""

发表于: 2007-05-20,修改于: 2007-05-20 16:02,已浏览3793次,有评论5条 推荐 投诉


网友评论
网友: 本站网友 时间:2007-06-20 13:33:04 IP地址:219.142.219.★
谢谢共享了

网友: 徒步天下 时间:2007-09-05 10:04:46 IP地址:218.7.6.★
不错,已经转载到我的博客,谢谢!
http://hiker2008.blog.51cto.com/10867/41111

网友: 本站网友 时间:2007-09-12 06:18:27 IP地址:222.210.67.★
说实话,写得太LJ了,我都写过一个,先用wget得网页,自动分析并处理然后提取网页中的字典名字,然后自动生成下载列表,最后用多线程下载工具,自动下载

网友: 本站网友 时间:2007-09-20 05:57:17 IP地址:124.135.211.★
楼上的,你多厉害啊,那你怎么不拿出来共享下呀?最看不惯你你这种人,自以为是,哪凉快哪待着去!

网友: 本站网友 时间:2007-09-25 11:00:18 IP地址:203.88.202.★
支持楼上的网友。没有必要这样说博主,这种人太可恶了。

 发表评论