linux shell脚本:在脚本中实现读取键盘输入,根据输入判断下一步的分支
echo please input “runbip” to run bip.
variableName="null"
while [ $variableName != "runbip" ]
do
read variableName
sleep
if [ $variableName != "runbip" ]; then
echo please input “runbip” to run the BIP:
fi
done
参考:
1. Linux Shell编程入门 http://www.cnblogs.com/suyang/archive/2008/05/18/1201990.html
linux shell脚本:在脚本中实现读取键盘输入,根据输入判断下一步的分支的更多相关文章
- Linux shell 执行修改配置文件中的内容
在开发的过程中可能Linux环境不一致需要适应本地环境的HOME目录,可以通过脚本来修改配置文件内容,写一个test.sh的脚本 在脚本里写入以下命令 sed -i “s#ftfts_com_serv ...
- Linux Shell 网络层监控脚本(监控包括:连接数、句柄数及根据监控反馈结果分析)
脚本监控: 获取最大句柄数的进程: 链接分析: 脚本片段: case "$handle" in 2) echo "The handle of the process : ...
- Linux Shell 自动备份脚本
写一个使用shell脚本增量备份系统文件,顺便复习一下shell脚本相关的命令,这个脚本可以根据自己的需求来备份不同的文件或者文件夹,进行完整备份和增量备份. 参考的网址:http://blog.51 ...
- linux shell执行SQL脚本
#!/bin/sh user="user" pass="pass" sqlplus -S $user/$pass select 1 from dual; exi ...
- Linux Shell 之 对文件中的行、单词、字符进行迭代
在进行文本文件进行处理时,对文件件中的行.单词.字符进行迭代和遍历是非常常用的操作.而将一个简单的循环用于迭代,再加上来自stdin或文件的重定向,这就是对文件中的行.单词.和字符进行迭代的基本方法. ...
- linux shell 去掉文本处理中的双引号
cat aa.txt |sed 's/\"//g' 结果是:hello aa.txt "hello"
- shell中通过读取输入yes no判断下一步如何处理
if [ -d $r_item_rmgit ];then read -p "$r_item_rmgit exit, replace it ...
- 机器取代人类成为现实,Linux shell才可被取代?
机器取代人类成为现实,Linux shell才可被取代? 新睿云 新睿云 新睿云-让云服务触手可及 本次笔者用通俗易懂的语言介绍一下Linux shell,由于笔者能力有限,如有有描述不准确的地方还请 ...
- 从shell(终端)中退出python
从shell(终端)中退出python: 1.输入命令行:$ exit() 2.快捷键: ctrl+Z
随机推荐
- 网易新闻首页iOS
// // ViewController.m // wyy // // Copyright © 2016年 zm. All rights reserved. // #import "V ...
- c++子类和父类成员函数重名
子类和父类返回值参数相同,函数名相同,有virtual关键字,则由对象的类型决定调用哪个函数. 子类和父类只要函数名相同,没有virtual关键字,则子类的对象没有办法调用到父类的同名函数,父类的同名 ...
- [Swust OJ 856]--Huge Tree(并查集)
题目链接:http://acm.swust.edu.cn/problem/856/ Time limit(ms): 1000 Memory limit(kb): 10000 Description T ...
- 作为Qt 合作伙伴的V-Play,比大家都领先了一步 planet.qt.io
今天发布博客,将Flappy Bird和其它的小游戏移植到Respberry PI了 http://planet.qt.io/ planet.qt.io 的repo: https://coderevi ...
- 基于visual Studio2013解决C语言竞赛题之0418位数操作
题目 解决代码及点评 /************************************************************************/ /* 18. 给 ...
- [置顶] 使用红孩儿工具箱完成基于Cocos2d-x的简单游戏动画界面
[Cocos2d-x相关教程来源于红孩儿的游戏编程之路CSDN博客地址:http://blog.csdn.net/honghaier 红孩儿Cocos2d-X学习园地QQ3群:205100149,47 ...
- [Andriod官方API指南]连接之蓝牙
Bluetooth —— 蓝牙 The Android platform includes support for the Bluetooth network stack, which allows ...
- linux 单网卡绑定两个ip
一.ubuntu系统: #vi /etc/network/interfaces OR $ sudo vi /etc/network/interfaces Modify as follows: au ...
- pthread_detach(pthread_self())
pthread_detach(pthread_self()) 将状态改为unjoinable状态,确保资源的释放.其实简单的说就是在线程函数头加上 pthread_detach(pthread_sel ...
- VMware三种链接方式
VMware三种链接方式 第一种:桥接Bridged 如其的说明:connected directly to the physical networkà直接连接到物理网络.如果是通过路由器连接出来的D ...