码迷,mamicode.com
首页 >  
搜索关键字:bash 脚本选项及组合条件测试    ( 15237个结果
Bash 快捷键
生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率。编辑命令Ctrl + a :移到命令行首Ctrl + e :移到命令行尾Ctrl + f :按字符前移(右向)Ctrl + b :按字符后移(左向)Alt + f :按单词前移(右向)Alt + b :按单词后移(左向...
分类:其他好文   时间:2014-06-27 15:08:30    阅读次数:139
邮件报警shell脚本
温馨提示 首先要安装postfix 或者 sendmail 等邮件服务器1.Apache#!/bin/bash#apache.shnc -w2 localhost 80 if[ $? -ne 0 ]then echo "apache is down,please check" | mail us.....
分类:其他好文   时间:2014-06-27 15:03:59    阅读次数:256
Android开发杂记(一)
1、cygwin环境变量设置可在Cygwin.bat 中设置set NDK_ROOT=P:/android/android-ndk-r8e或者在home\Administrator\.bash_profile中设置NDK_ROOT=/cygdrive/p/android/android-ndk-r8...
分类:移动开发   时间:2014-06-26 22:51:13    阅读次数:389
bash 函数返回值任意值
bash函数的返回值只能是一个数值,以0表示成功,非0表示失败。如果想在bash函数中返回除了数值之外的值,需要些技巧。以返回一个字符串为例:1. 通过全局变量var1 function fun()2 {3 var="Hello world!"4 }5 6 fun7 echo $var2. ...
分类:其他好文   时间:2014-06-26 20:18:05    阅读次数:199
bash 中的case语法
CASE语法格式备忘 1 case $variable-name in 2 pattern1) 3 command1 4 ... 5 .... 6 commandN 7 ;; 8 pattern2|p...
分类:其他好文   时间:2014-06-26 19:48:13    阅读次数:236
Python程序文件结构02
一、Python程序文件1.Python源程序文件通常以.py为扩展名例如,新建一个名为firstpycode.py的文件,内容如下所示:#!/bin/bash/pythonimportplatform-->导入模块printplatform.uname()-->1)第一行为shebang,即执行脚本时通知内容要启动的解释器2)第二行通过import导入一..
分类:编程语言   时间:2014-06-26 06:31:32    阅读次数:275
a little riak book
a little riak book 的无聊总结 #!/bin/bash # Riak HTTP interface stays true to their intent: 1xx Informational, 2xx Success, # 3xx Further Action, 4xx Client Error, 5xx Server Error ### put PORT=10...
分类:其他好文   时间:2014-06-25 08:22:11    阅读次数:178
linux 脚本测试网络速度
example: ./netspeed eth0   1 #!/bin/bash   2   3 INTERVAL="1"  # update interval in seconds   4   5 if [ -z "$1" ]; then   6 echo   7 echo usage: $0 [network-interface]   8 echo   9 echo ...
分类:系统相关   时间:2014-06-25 07:24:00    阅读次数:213
CentOS 6.5初始化优化脚本
#!/bin/bash echo"这个是系统初始化脚本,请慎重运行!" input_fun() { OUTPUT_VAR=$1 INPUT_VAR="" while[-z$INPUT_VAR];do read-p"$OUTPUT_VAR"INPUT_VAR done echo$INPUT_VAR } input_again() { MYHOSTNAME=$(input_fun"pleaseinputthehostname:") DOMAINNAME=$(input_fun"p..
分类:其他好文   时间:2014-06-25 06:16:37    阅读次数:345
编译 gstreamer的相关组件
1 #!/bin/bash 2 3 # Create a log file of the build as well as displaying the build on the tty as it runs 4 exec > >(tee build_gstreamer.log) 5 exe...
分类:其他好文   时间:2014-06-25 00:44:22    阅读次数:324
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!