码迷,mamicode.com
首页 >  
搜索关键字:shell functions    ( 29951个结果
[SHELL]判断一个命令是否存在
首先要说明的是,不要使用which来进行判断,理由如下:1、which非SHELL的内置命令,用起来比内置命令的开销大,并且非内置命令会依赖平台的实现,不同平台的实现可能不同。# type typetype is a shell builtin# type commandcommand is a s...
分类:其他好文   时间:2014-06-29 15:27:20    阅读次数:1334
Android自动化测试初探(五): 再述模拟键盘鼠标事件(adb shell 实现) .
http://blog.csdn.net/roger_ge/article/details/5552740转自csdn,实现模拟鼠标键盘系列上一篇博文中讲述了通过Socket编程从外部向Emulator发送键盘鼠标模拟事件,貌似实现细节有点复杂。其实Android还有一种更简单的模拟键盘鼠标事件的方...
分类:移动开发   时间:2014-05-28 23:59:43    阅读次数:582
php执行外部命令
php执行外部命令的不少,例如:exec、shell_exec、system、popen等。我特意的讲一下popen,它跟其他函数不太一样,其他函数执行一个命令后,会等待其返回后,再向下执行,而popen则不会。所以你想用php程序并行的处理一些业务的时候,可以用popen。我举个例子,有两个php...
分类:Web程序   时间:2014-05-28 22:45:34    阅读次数:346
[Linux监控]磁盘空间大小
echo 192.168.10.69>>ip.list-------------------------------------------#!/bin/bash#注意if和[]之间的空格rm -f ~/fanr/shell/DiskUsageAlert/out.printout=$(cat ~/f...
分类:系统相关   时间:2014-05-28 14:54:26    阅读次数:391
shell if判断(曾经被一个字符串相等的判断纠结半小时,最后只是if后少了个空格!) 和 awk引用外部变量判断
一、if判断数字: $A=12 $B=15 if(("$A"<"$B")) if(("$A"=="$B"))字符串: $A="HELLO" $B="WORLD" if [ "$A" = "FACT_LOGIN_USER" ] if [ "$A" = "$B" ]PS:字符串比较的时候...
分类:其他好文   时间:2014-05-28 09:32:44    阅读次数:347
清空系统日志shell scripts——自学笔记
这是一个清空系统日志的脚本:vim logmess_clean.sh#bin/bash //该脚本所使用的shell解释器cd /var/log///切换到存放日志目录echo > messages//清空日志echo "logmessages is clean"//脚本执行完成后输出“日志清空”[...
分类:其他好文   时间:2014-05-28 02:09:50    阅读次数:320
《通过脚本查看哪些ip被占用》shell笔记
改脚本查看哪些ip被占用。#!/bin/bashfor i in {1..10} //赋予i变量1-10do//干什么ping -c1 -w1 192.168.7.$i &> /dev/null //ping 192.168.7.网段 每个ip1次 显示1行全输出到无底洞if [ $? -eq 0 ...
分类:其他好文   时间:2014-05-28 00:04:45    阅读次数:321
JavaScript Patterns 2.11 Writing Comments
Document all functions, their arguments and return values, and also any interesting or unusual algorithm or technique. Think of the comments as hints ...
分类:编程语言   时间:2014-05-27 18:05:25    阅读次数:355
shell 生产带有作者信息的基本go源文件
#!/bin/bash# Program to output a go source file with user informationCURRENT_TIME=$(date +"%x %r %Z")cat << EOF/* Author:$USER CreatedAt:$CURRENT_TIME...
分类:其他好文   时间:2014-05-27 17:49:29    阅读次数:283
Version of SQLite used in Android?
sing the emulators (adb shell sqlite3 --version):SQLite 3.7.11:19-4.4-KitKat18-4.3-Jelly Bean17-4.2-Jelly Bean16-4.1-Jelly BeanSQLite 3.7.4:15-4.0.3-I...
分类:移动开发   时间:2014-05-27 16:06:58    阅读次数:389
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!