learning shell check host dependent pkg
【Purpose】
Shell script check host dependent pkg
【Eevironment】
Ubuntu 16.04 bash env
【Procdeure】
Source code:
dependent_pkg="gitk"
for pkg in $dependent_pkg; do
if ! dpkg-query -l $pkg | grep -q ii; then
echo installing $pkg ..
sudo apt-get -y install $pkg
fi
done
learning shell check host dependent pkg的更多相关文章
- learning shell check requires root privileges
[Purpose] Shell script check requires root privileges [Eevironment] Ubuntu 16.04 bas ...
- learning shell built-in variables (1)
Shell built-in variables [Purpose] Learning shell built-in variables, example $0,$1,$2,$3,$#, ...
- Check Host:实时监控网站或者服务器是否可以访问
如果你拥有一个网站,那么最重要的事情就是要保证它24小时都能够访问.不过国内的虚拟主机服务非常糟糕,经常会出现各种状况,所以我们需要一个软件,可以让我们第一时间知道网站出现了无法访问的情况,从而通知售 ...
- SSH Secure Shell Client--- the host may be dow
the host may be down,or there may be a problem with the network connection. Sometimes such problems ...
- learning shell script prompt to run with superuser privileges (4)
Shell script prompt to run with superuser privileges [Purpose] Check whether have root privil ...
- learning shell args handing key=value example (2)
Shell args handing key=value example [Purpose] Learning how to handing ker=value args [Eevi ...
- shell (check return of each line)and sudoer
shell result from cmdline echo $? if 0 then success ;else failure (shell 执行每部返回值,rm -rf 错误,打包不能覆盖) 解 ...
- learning shell display alert function
[Purpose] Shell print function base on err info wrn ext output level [Eevironment] U ...
- learning shell get script absolute path (3)
Shell get script absolute path [Purpose] Get shell script absolute path [Eevironment] ...
随机推荐
- Codeforces Round #584 (Div. 1 + Div. 2)
Contest Page A sol 每次选最小的,然后把它的所有倍数都删掉. #include<bits/stdc++.h> using namespace std; int read( ...
- Windows下非PE方式载荷投递方式研究
0. 引言 0x1:载荷是什么?在整个入侵过程中起到什么作用? 载荷的作用在整个入侵链路的作用起到纽带的作用,它借助于目标系统提供的某些功能:组件:执行环境,将攻击者的传递的恶意payload包裹起来 ...
- Jenkins部署git+python项目实现持续集成
目录 1. 创建 item 2. 配置 3. 构建 1. 创建 item 接下来填写创建任务的名字,并选择创建一个 Freestyle project ,点击确认. 2. 配置 接下来进入到项目相关配 ...
- Prime Path POJ-3126
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that ...
- FreePascal - Typhon如何添加不能识别单元?
Typhon 32位 6.9 问题:想使用LSUtils单元,这个单元在Lazarus里面,直接引入就可以使用,而且单元头注释明显写明是CodeTyphon工程的一部分,那么正常在Typhon只要引入 ...
- Android-----RadioButton单选使用(实现简单温度转换)
废话少说,直接上代码: xml布局文件代码: <?xml version="1.0" encoding="utf-8"?> <LinearLa ...
- 数据结构与算法—Trie树
Trie,又经常叫前缀树,字典树等等.它有很多变种,如后缀树,Radix Tree/Trie,PATRICIA tree,以及bitwise版本的crit-bit tree.当然很多名字的意义其实有交 ...
- PHP简单实现异步多文件上传并使用Postman测试提交图片
虽然现在很多都是使用大平台的对象存储存放应用中的文件,但有时小项目还是可以使用以前的方式上传到和程序一起的服务器上,强调一下这里是小众需求,大众可以使用阿里云的OSS,腾讯的COS,七牛的巴拉巴拉xx ...
- 大数据集群环境搭建之一 hadoop-ha高可用安装
1.如果你使用root用户进行安装. vi /etc/profile 即可 系统变量 2.如果你使用普通用户进行安装. vi ~/.bashrc 用户变量 export HADOOP_HOME=/ex ...
- 常用Windows命令、常用 Cmd命令(补充)
常用的Windows 命令使用能够提升工作效率以及快捷处理事项. 下面为平时常用的Windows 命令/cmd 命令. 一.以下命令无需打开cmd 窗口即可操作(输入完毕 打个 回车,即可执行). 1 ...