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. HDU校赛 | 2019 Multi-University Training Contest 4

    2019 Multi-University Training Contest 4 http://acm.hdu.edu.cn/contests/contest_show.php?cid=851 100 ...

  2. 《即时消息技术剖析与实战》学习笔记3——IM系统如何保证消息的实时性

    IM 技术经历过几次迭代升级,如图所示: 从简单.低效的短轮询逐步升级到相对效率可控的长轮询: 全双工的 Websocket 彻底解决了服务端的推送问题: 基于 TCP 长连接衍生的 IM 协议,能够 ...

  3. laravel hash密码生成和密码验证

    在laravel中 登录表单中的密码是用hash来生成的. 在生成密码需要用到 laravel框架中的方法(都是laravel封装好了的) bcrypt($password)方法,直接将获取到的pas ...

  4. C# VB .net读取识别条形码线性条码codabar

    codabar是比较常见的条形码编码规则类型的一种.如何在C#,vb等.NET平台语言里实现快速准确读取codabar条形码呢?答案是使用SharpBarcode! SharpBarcode是C#快速 ...

  5. Ubuntu系统下搭建docke

    linux内核版本依赖 kernel version >= 3.8 可以使用如下命令查看 uname -a | awk '{split($3, arr, "-"); prin ...

  6. Asp.Net Core 生成二维码(NuGet使用QRCoder)

    前言 功能:调用web api 接口 1.获取 jpeg 格式的二维码 2.获取中间带有logo 的二维码 3. 下载 jpeg,svg 格式的二维码 需要的NuGet 包: > QRCoder ...

  7. 【GitHub】源代码管理工具初识

    软件工程综合实践第四次个人作业 作业要求:通过搜索资料和自学,了解源代码管理工具——GitHub 前言: GitHub,读音 /git·hʌb/ ,让社会化编程成为现实,其于2018年6月4日被微软收 ...

  8. Python基础(四)--数据类型、字符编码、文件处理

    一.数据类型 1. 数据类型 数字(整形,长整形,浮点型,复数) 字符串 字节串(字节bytes类型) 列表 元组 字典 集合 2. 按照以下几个点展开数据类型的学习 #=============== ...

  9. 【Spring】Spring注解之@EnableConfigurationProperties

    一.@EnableConfigurationProperties注解的作用 使能够对@ConfigurationProperties注解的bean的支持.   简单理解就是:可以在我们的配置类上不加@ ...

  10. “IOS11不再信赖WOSIGN证书”公众号运营者如何应对

    ptd->_thandle = (uintptr_t)(-1); {{}/*** 传入需要的参数,设置给*/{}给Fragment添加newInstance方法,将需要的参数传入,设置到bund ...