码迷,mamicode.com
首页 >  
搜索关键字:bash    ( 15235个结果
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
svn 钩子脚本
#vimpost-commit#!/bin/bash REPOS="$1" REV="$2" SVNLOOK="/usr/bin/svnlook" echo"`date+%F`">>/tmp/post.log echo"REPOS=$1REV=$2">>/tmp/post.log echo-e"\$@=$@#">>/tmp/post.log echo-e"`date+%F`end\n">>/tmp/post.log $SVNLOOKchanged"$REPOS..
分类:其他好文   时间:2014-06-24 16:38:56    阅读次数:282
nagios 监控 网卡流量 脚本
#!/bin/bash # #Time:2014-06-23 #Author:ftlynx #Function:useNET-SNMPgetNICtrafficonnagios. Usage(){ echo"Usage:check_traffic.sh[options]" echo" -H HostIP." echo" -P net-snmpcommunitystring." echo" -N NICName." echo" -W nagioswarningvalue.Format:200,300..
分类:移动开发   时间:2014-06-24 16:10:35    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!