- linux下用for循环卸载openoffice
- 发布时间:2008-08-24 17:11:27 浏览数:6363 发布者:dingjianping 设置字体【大 中 小】
当需要安装高版本openoffice或openoffice出问题的时候,就需要卸载openoffice,但是openoffice的包相当多,如果一个一个地卸载,那就不知道要何年何月才能卸载完,所以写了一个脚本来卸载openoffice,脚本很简单,实际上就是一个for循环,大家可以举一反三,用同样的方法卸载其它包。
QUOTE:
shell> vi uninstallopenoffice.sh
for file in `rpm -qa|grep openoffice`
do
rpm -e --nodeps $file
done
shell> chmod +x uninstallopenoffice.sh
完成后运行uninstallopenoffice.sh就可以轻松地卸载掉openoffice了。