Welcome 微信登录

首页 / 操作系统 / Linux / Linux下用for循环卸载openoffice

当Linux下需要安装高版本openoffice或openoffice出问题的时候,就需要卸载openoffice,但是openoffice的包相当多,如果一个一个地卸载,那就不知道要何年何月才能卸载完,所以写了一个脚本来卸载openoffice,脚本很简单,实际上就是一个for循环,大家可以举一反三,用同样的方法卸载其它包。shell> vi uninstallopenoffice.shfor file in `rpm -qa|grep openoffice`dorpm -e --nodeps $filedoneshell> chmod +x uninstallopenoffice.sh完成后运行uninstallopenoffice.sh就可以轻松地卸载掉openoffice了。