Linux command dialog

Purpose

       Learning how to use dialog commad, do  man-machine interaction.

 

Eevironment

       Ubuntu 16.04 terminal

 

Procdeure

       Source code:

      

#!/bin/bash

TTY_X=$(($(stty size | awk '{print $2}')-6)) # determine terminal width
TTY_Y=$(($(stty size | awk '{print $1}')-6)) # determine terminal height
# We'll use this title on all menus
backtitle="test dialog" options+=("yes" "U-boot and kernel packages")
options+=("no" "Full OS image for flashing")
KERNEL_ONLY=$(dialog --stdout --title "Choose an option" --backtitle "$backtitle" --no-tags --menu "Select what to build" \
$TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}")
echo "KERNEL_ONLY=$KERNEL_ONLY"
unset options

  test result :

  

linux command dialog的更多相关文章

  1. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  2. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  3. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

  4. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

  5. Linux Command Line 解析

    Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...

  6. 15 Examples To Master Linux Command Line History

    When you are using Linux command line frequently, using the history effectively can be a major produ ...

  7. 10 Interesting Linux Command Line Tricks and Tips Worth Knowing

    I passionately enjoy working with commands as they offer more control over a Linux system than GUIs( ...

  8. Reso | The Linux Command Line 的中文版

    http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...

  9. [笔记]The Linux command line

    Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...

随机推荐

  1. SpringBoot中使用mybatis-generator自动生产

    步骤: 1.在pom.xml中添加插件配置 <plugin> <groupId>org.mybatis.generator</groupId> <artifa ...

  2. LOJ#2632. 「BalticOI 2011 Day1」打开灯泡 Switch the Lamp On

    题目描述 译自 BalticOI 2011 Day1 T3「Switch the Lamp On」有一种正方形的电路元件,在它的两组相对顶点中,有一组会用导线连接起来,另一组则不会.有 N×M 个这样 ...

  3. Unity3D学习笔记(四):物理系统碰撞和预制体

    Rigidbody(刚体组件):加了此组件游戏物体就变成刚体了 ----Mass(质量,单位kg):重力G = 质量m * 重力加速度g(g=9.81 m/s^2) --------冲量守恒定理 动量 ...

  4. .Net页面局部更新的思考

    最近在修改以前做的模块,添加一个新功能.整理了下才发现重用率很低,大部分的东西还是需要重新写.功能里用到了局部更新,所有整理一下一路来实现局部更新的解决方案及改进. 我接触的项目开发大多是以Asp.n ...

  5. UVa 1252 20个问题

    https://vjudge.net/problem/UVA-1252 题意: 有n个物体,m个特征.每个物体用一个m位01串表示,表示每个特征是具备还是不具备.我在心里想一个物体,由你来猜. 你每次 ...

  6. JS进阶系列之this

    在javascript中,this的指向是在执行上下文的创建阶段确定的,其实只要知道不同执行方式下,this的指向分别是是什么,就能很好的掌握this这个让人摸不透的东西. 一.全局执行 全局执行又分 ...

  7. LR下载及破解

    原文:http://chjuan1122.blog.163.com/blog/static/122892032013327111040128/ 地址:http://www.genilogix.com/ ...

  8. linux之cut用法--转载

    cut是一个选取命令,就是将一段数据经过分析,取出我们想要的.一般来说,选取信息通常是针对“行”来进行分析的,并不是整篇信息分析的. (1)其语法格式为:cut  [-bn] [file] 或 cut ...

  9. go 接口

    1. package main import ( "fmt" ) type Phone interface { call() } type NokiaPhone struct { ...

  10. c++ 判断容器A是否是容器B的子集,如果是,返回true(includes)

    #include <iostream> // cout #include <algorithm> // includes, sort using namespace std; ...