Time of Update: 2014-09-10
標籤:style blog http color 使用 ar strong for 檔案 五、為了安全要求每次執行shell都手工輸入密碼$ vi test5.sh#!/
Time of Update: 2014-09-11
標籤:linux shell shell當中的數組和其他程式設計語言的意義是一樣的,考慮到shell是一個弱類型的指令碼語言,可以在command lime當中直接去定義和使用例如:$a[1]="Monday"$echo ${a[1]}Monday$注意這裡用花括弧,如果寫成echo $a[1]
Time of Update: 2014-08-22
標籤:style blog color os io for ar 2014 實現一個自己的shell解譯器,其原理比較簡單,首先擷取使用者的輸入,通過fork()函數擷取兩個進程(父子進程),子進程通過execvp()函數繼續進
Time of Update: 2014-08-19
標籤:style blog color 使用 for ar div 代碼 2.return與exit區別return
Time of Update: 2014-08-02
標籤:style color 工作 linux 應用 設計 c 編程 shell通俗理解:把使用者輸入的命令翻譯給作業系統。shell
Time of Update: 2014-07-25
標籤:linux shell來源:(linux shell)第一章--小試牛刀(上)從今天開始,我們一起來學習《linux shell指令碼攻略》這本書。1.1簡介shell指令碼通常是一個以#!起始的文字檔,如下所示: #!/bin/bash有兩種執行shell指令碼的方式,分別如下: sh script.sh
Time of Update: 2014-09-12
標籤:style http os ar strong for 檔案 資料 div ./bin/spark-shell --master
Time of Update: 2014-09-11
標籤:style blog os ar div sp log on c ---今天篇幅比較少;只介紹引號。shell中的引號有三種:雙引號",單引號‘,反引號`1.
Time of Update: 2014-08-28
標籤:style blog color ar art div log amp sp 指令碼如下:#!/bin/sh#要檢查的進程名PROGRESS_NAME="heihu_server"#---
Time of Update: 2014-08-27
標籤:style os io for ar 檔案 2014 問題 div 事情由起:svn的url在excel裡,我複製到txt文本下,vi做些文本處理,只提取了url,
Time of Update: 2014-08-26
標籤:檔案 sp c file 資訊 print bs ca 方法 最近要查看的記錄檔提取後有很多空行,不利於以前的檔案可以進行比較了,為了向下相容,只能取得時候把空行刪除掉。自己google了
Time of Update: 2014-08-20
標籤:style blog http io 檔案 ar art div shell指令碼中執行另一個shell指令碼可以在一個shell指令碼中執行另一個shell指令碼(或非可執行檔,主要用於取得一些變數的值),方法是:.
Time of Update: 2014-08-18
標籤:style blog http color 使用 io for ar Shell 指令碼變數預設是作為字串處理,而不是數字,這使得在 Shell 指令碼做數學運算顯得較為複雜。在保持指令碼編程規範和更好的算術支援方便,
Time of Update: 2014-08-17
標籤:orangleliu shell cron 路徑 執行 問題出現的情境大概就是1 cron調用一個python指令碼2 python指令碼中調用一個shell指令碼(對日誌分析)擷取shell輸出然後發送郵件類似一個監控任務。直接執行python指令碼沒有問題,但是寫在cron中之後,
Time of Update: 2014-08-17
標籤:style blog http color strong 檔案 2014 amp /*--------------------------------------------------------------------
Time of Update: 2014-08-16
標籤:style io ar cti div 時間 line log 目標實現記錄SHELL執行的開始時間,結束時間,運行狀態,錯誤資訊等,以函數封裝日誌記錄的方式,指令碼調用函數源碼通用函數指令碼program_log_new
Time of Update: 2014-07-27
標籤:shell
Time of Update: 2014-07-26
標籤:continue while break function break:退出迴圈體continue:結束本次迴圈,進入下一次迴圈。while特殊用法1:while :dodone上述為while的死迴圈。while特殊用法2:while read LINEdodone < /path/to/FILE作
Time of Update: 2014-09-13
shell學習之< 和 > 差在哪?,shell學習在哪嚴格來說,< 符號之前需要指定一個 FD 的(之間不能有空白),但因為 0 是 < 的預設值,因此 < 與 0< 是一樣的!>
Time of Update: 2014-08-12
[Shell]輸入參數擷取shell指令碼的輸入參數,並且判斷得到的參數。#!/bin/bash#title: testPT.sh#atuhor: orangleliu#date: 2014-08-08#desc: 輸入2個參數,第二個位元字,如果正確就列印出來,錯誤提示出來#=====================#Function Check#=====================Check(){if [ $# -ne 2 ] #charge params numthen