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的更多相关文章

  1. learning shell check requires root privileges

    [Purpose]        Shell script check requires root privileges   [Eevironment]        Ubuntu 16.04 bas ...

  2. learning shell built-in variables (1)

    Shell built-in variables [Purpose]        Learning shell built-in variables, example $0,$1,$2,$3,$#, ...

  3. Check Host:实时监控网站或者服务器是否可以访问

    如果你拥有一个网站,那么最重要的事情就是要保证它24小时都能够访问.不过国内的虚拟主机服务非常糟糕,经常会出现各种状况,所以我们需要一个软件,可以让我们第一时间知道网站出现了无法访问的情况,从而通知售 ...

  4. 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 ...

  5. learning shell script prompt to run with superuser privileges (4)

    Shell script prompt to run with superuser privileges [Purpose]        Check whether have root privil ...

  6. learning shell args handing key=value example (2)

    Shell args handing key=value example [Purpose]        Learning how to handing ker=value args   [Eevi ...

  7. shell (check return of each line)and sudoer

    shell result from cmdline echo $? if 0 then success ;else failure (shell 执行每部返回值,rm -rf 错误,打包不能覆盖) 解 ...

  8. learning shell display alert function

    [Purpose]        Shell print function base on err info wrn ext output level   [Eevironment]        U ...

  9. learning shell get script absolute path (3)

    Shell get script absolute path [Purpose]        Get shell script absolute path   [Eevironment]       ...

随机推荐

  1. vue nexttick的理解和使用场景

    应用场景 需要在视图更新之后,基于新的视图进行操作 文档说明 在下次 DOM 更新循环结束之后执行延迟回调.在修改数据之后立即使用这个方法,获取更新后的 DOM nextTick原理 1.异步说明 V ...

  2. 菜刀连接一句话木马出现:`Cannot call assert() with string argument dynamically`错误

    前言 逆天还是上学那会玩渗透的,后来工作后就再也没碰了,所以用的工具还是以前经典款,这不,发现出问题了 问题 如果是PHP5则没有问题,如果是PHP7,会出现:Cannot call assert() ...

  3. SQL 2008R2问题:用户、组或角色'XXX'在当前数据库中已存在?

    为一个数据库添加一个用户或者映射数据库时,提示以下错误信息: 用户.组或角色 '*****' 在当前数据库中已存在. (Microsoft SQLServer, 错误 : 15023) 问题原因:在还 ...

  4. Visual Studio 技巧

    Visual Studio 技巧 1 常用设置 2 常用快捷键 2.1 系统默认快捷键 2.2 自定义快捷键 3 修复系统错误 1 常用设置 Text Editor -> All Languag ...

  5. vant-ui rem问题

    使用vant-ui时rem单位问题 vue-cli3.x项目引入vant-ui1.6.21,要求在项目中使用rem单位,但vant是px的.故,需要添加一个自动转换插件和一段修改html根元素的fon ...

  6. 嵌入式Web服务器boa在ARM平台的移植步骤

    1.下载http://www.boa.org/ 2.解压tar xzf boa-0.94.13.tar.gz 3.编译cd boa-0.94.13/src./configure 生成了makefile ...

  7. uni-app学习(二)

    1. uni-app学习(二) 1.1. 好用css记录 一定透明度的背景色background: rgba(255,255,255,.6); 1.2. 好用的代码段 store(用户登录) expo ...

  8. 从 Vue 的视角学 React(四)—— 组件传参

    组件化开发的时候,参数传递是非常关键的环节 哪些参数放在组件内部管理,哪些参数由父组件传入,哪些状态需要反馈给父组件,都需要在设计组件的时候想清楚 但实现这些交互的基础,是明白组件之间参数传递的方式, ...

  9. Flask的上下文管理

    flask上下文管理 1.运用的知识点 val = threading.local() def task(arg): #threading.local() val.xxx=123 #内部,获取当前线程 ...

  10. windows创建虚拟环境

    mkvirtualenv --no-site-packages --python=C:\Python36\python.exe MyCrawler