Time of Update: 2015-05-19
標籤:adb shell input keyevent 7 # for key ‘0‘adb shell input keyevent 8 # for key ‘1‘adb shell input keyevent 29 # for key ‘A‘adb shell input keyevent 54 # for key ‘B‘adb shell input text "ANDROID" ------------------------------------------
Time of Update: 2015-05-21
標籤:轉自:http://blog.csdn.net/wklken/article/details/6562098Sort,uniq,join,cut,paste,split命令—— SortSort 可將許多不同的域按不同的列順序分類命令格式:sort –cmu –o out-putfile [other options] *pos1 *pos2 input-files選項: -c
Time of Update: 2015-05-19
標籤:shell linux 點號 空格 今天在看/etc/init.d/nginx指令碼時,發現指令碼中存在大量行為(點號 空格 檔案名稱),甚是不解。比如檔案開始的幾行: <span style="font-size:18px;
Time of Update: 2015-05-21
標籤:linux 核心 shell kernel bash Linux作業系統可以分為shell和kernel兩個部分,kernel是核心,提供了作業系統的核心功能。shell是外殼,是串連kernel(核心)和使用者的。也就是說使用者通過shell來使用kernel體供地功能。
Time of Update: 2015-05-18
標籤:expect 跳過密碼驗證 #!/bin/bashLocal_Dir=‘/tmp/test_huadan‘Ip=‘192.168.0.221‘PassWord=‘Lhm0125‘Des_Dir=‘/tmp/test_huadan‘List=$(find $Local_Dir -cmin -60)for i in $List do#echo&n
Time of Update: 2015-05-18
標籤:shell 分析nginx log本指令碼分析Nginx
Time of Update: 2015-05-20
標籤:shell 變數一 變數定義1 顯式定義 variable=XXX 沒有空格2 read variable讀取主要寫了如下兩行代碼,讀取name和namefamilyread -p "please input your name:" nameread -p "please input your&
Time of Update: 2015-05-18
標籤: 在Shell裡面判斷字串是否為空白分類: Linux shell2011-12-28 23:18 15371人閱讀 評論(0) 收藏 舉報shell主要有以下幾種方法:echo “$str”|awk ‘{print length($0)}‘expr length “$str”echo “$str”|wc
Time of Update: 2015-05-19
標籤:adb shell as root after device rootedonce device rooted, we must perform "su" before we get root permission in adb shell,this is not convenient in some situations,so there have a method to get permission without perform "su".adb shellsumount -o
Time of Update: 2015-05-18
標籤:shell 算術運算 expr let Shell中也可以實現基本算術運算,以及位元運算。 我們總結起來有如下幾點: 1)基本的算術運算子:+、-、*、/、**都支援,最後的**是冪運算; 2)算術運算要和一些命令結合才能使用,如expr`..
Time of Update: 2015-05-18
標籤:shell 進位轉換 在Shell中預設表示數值為十進位,那麼二進位、八進位和十六進位如何表示呢? 方法1:使用首碼。 0開頭表示八進位,0x開頭表示十六進位。 如下:#-----------------------------/chapter4/ex4-35.sh------------------#!
Time of Update: 2015-05-19
標籤:shell 指令碼 建立一個指令碼 Linux中有好多中不同的shell,但是通常我們使用bash (bourne again shell) 進行shell編程,因為bash是免費的並且很容易使用。所以在本文中筆者所提供的指令碼都是使用bash(但是在大多數情況下,這些指令碼同樣可以在 bash的大姐,bourne
Time of Update: 2015-05-20
標籤:getopts 命令用途處理命令列參數,並校正有效選項。文法getopts 選項字串 名稱 [ 參數 ...]描述 getopts 的設計目標是在迴圈中運行,每次執行迴圈,getopts 就檢查下一個命令列參數,並判斷它是否合法。即檢查參數是否以 - 開頭,後面跟一個包含在 options 中的字母。如果是,就把匹配的選項字母存在指定的變數 variable 中,並返回退出狀態0;如果 - 後面的字母沒有包含在 options 中,就在
Time of Update: 2015-05-18
標籤:shell 條件判斷語句 if elif case Shell中的條件判斷語句是前面一篇“Shell中的條件測試語句”的升級篇,也就是說,前面的測試語句是為了現在的判斷語句if~then~fi語句服務的。 我們還是按照注意點和代碼實現的方式鋪開:
Time of Update: 2015-05-18
標籤:一個標準的守護進程的啟動指令碼:#! /bin/shWHOAMI=`whoami`PID=`ps -u $WHOAMI | gerp mydaemond | awk '{print $1}'`if (test "$1" = "") thenecho "mydaemond [start][stop][version]"exit 0fiif ( test "$1" =
Time of Update: 2015-05-18
標籤:執行shell指令碼有以下幾種方式1、相對路徑方式,需先cd到指令碼路徑下[[email protected] tmp]# cd /tmp[[email protected] tmp]# ./ceshi.sh 指令碼執行成功2、絕對路徑方式[[email protected] tmp]# /tmp/ceshi.sh 指令碼執行成功3、bash命令調用[[email protected] /]# bash /tmp/ceshi.sh 指令碼執行成功4、
Time of Update: 2015-05-17
標籤:shell 條件測試 test 條件判斷 Shell有條件測試語句,一般用test命令或是[]命令來完成,它們是條件判斷語句if~then語句的基礎,特別是[]命令。下面我們講解一些條件測試語句。1. test命令實現條件測試
Time of Update: 2015-05-20
shell指令碼執行的幾種方式,shell指令碼幾種執行shell指令碼有以下幾種方式1、相對路徑方式,需先cd到指令碼路徑下[root@banking tmp]# cd /tmp[root@banking tmp]# ./ceshi.sh 指令碼執行成功2、絕對路徑方式[root@banking tmp]# /tmp/ceshi.sh 指令碼執行成功3、bash命令調用[root@banking /]# bash /tmp/ceshi.sh 指令碼執行成功4、. (空格)
Time of Update: 2015-05-20
Shell基礎之變數變數類別 Shell中的變數分為環境變數、位置變數、預定義變數和自訂變數四種。 環境變數 Shell環境變數是一類Shell預定義變數,用於設定系統、指令碼運行時環境的變數,由系統統一命名;環境變數的值一部分由系統設定,另一部分可由使用者自己定義。環境變數的名稱由大寫字母組成。常用的環境變數有:
Time of Update: 2015-05-20
shell指令碼執行的幾種方式執行shell指令碼有以下幾種方式1、相對路徑方式,需先cd到指令碼路徑下[root@banking tmp]# cd /tmp[root@banking tmp]# ./ceshi.sh 指令碼執行成功2、絕對路徑方式[root@banking tmp]# /tmp/ceshi.sh 指令碼執行成功3、bash命令調用[root@banking /]# bash /tmp/ceshi.sh 指令碼執行成功4、. (空格) 相對或絕對方式[root@banking