Time of Update: 2014-11-03
標籤:環境變數 bash shell 設定檔 介紹 瞭解Linux的啟動順序,也有助於本內容的理解,載入使用者環境是Linux啟動的最後一步。不同的shell 會使用不同的設定檔: bash (.profile), ksh (.profile), csh (.login)。bash shell 被設計成相容sh, ksh,
Time of Update: 2014-11-03
標籤:shellwhile CONDITION;do statmentdoneuntil CONDITION;do statmentdone練習:寫一個指令碼:每隔五秒鐘就看下jt有沒有登陸,沒有登陸則繼續執行,登陸了則停止命令650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/4D/A5/wKioL1RWFsOAf8tbAAEJjcmWsbw815.jpg" title="2.jpg"
Time of Update: 2014-11-03
標籤:blog ar 使用 for sp on 2014 log bs (1)if語句[email protected]:/mnt/shared/shellbox/shellif#
Time of Update: 2014-10-31
標籤:style blog io color ar 使用 sp 檔案 div 一、簡介[ 與 test 等價,是 bash 的內部命令,GNU/linux 系統的 coreutils
Time of Update: 2014-11-01
標籤:shell loop while until for 1. 迴圈shell迴圈,不斷執行某段程式,直到符合條件。迴圈分為4種, while迴圈,until迴圈,for固定處理, for數值處理。2. while迴圈while迴圈是一直執行,直到條件不符合,才停止。文法:while [ condition
Time of Update: 2014-10-31
標籤:style blog http 使用 sp strong 檔案 on 2014 變數說明:$$Shell本身的PID(ProcessID)$!Shell最後啟動並執行後台Process的P
Time of Update: 2014-10-31
標籤:second source file 指令碼 first (測試樣本1) #vi first.sh 1#!/bin/bash2echo ‘your are in first file‘ 問)在當前指令檔中調用另外一個指令檔?方法一: 使用 source指令碼 second (測試樣本2)# vi
Time of Update: 2014-10-31
標籤:shell測試 tomcat重啟[[email protected] bin]$ sh -n restart.sh [[email protected] bin]$ -n:不要執行script,僅僅檢查文法,如果正確不會有任何輸出,如果有錯,則會有提示[[email protected] bin]$ sh -x restart.sh + TOMCAT_HOME=/opt/apache-tomcat-8.0.14+ cd /opt/
Time of Update: 2014-10-29
標籤:style blog http ar sp 檔案 資料 on art linux 下shell 編寫指令碼:
Time of Update: 2014-10-30
標籤:des http io os ar 使用 for sp on #!/bin/bashcd
Time of Update: 2014-10-30
標籤:style blog io ar for sp 檔案 on 2014 Shell編程入門 一,變數賦值及算術運算// 範例程式碼:a=1echo $alet b=$
Time of Update: 2014-10-30
標籤:shell執行service命令時出現shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directorychdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or
Time of Update: 2014-10-28
標籤:花生殼 內網 ssh linux 連接埠映射 一、花生殼安裝(安裝前需要在花生殼網站註冊獲得一個免費網域名稱,有了這個網域名稱,後邊才能在外網通過訪問這個網域名稱來實現ssh登陸內網linux主機)[[email protected] 案頭]# wget
Time of Update: 2014-10-28
標籤:style blog io color ar sp div on art 一、文法select 變數 in con1 con2 con3 # 自動列出 con1,con2,con3
Time of Update: 2014-10-28
標籤:style blog io color ar sp div on log 一、文法while [ condition ] # 當 condition
Time of Update: 2014-10-22
標籤:style blog http color os 使用 sp 檔案 div Bash Shell 的作業環境:配置值分為系統整體配置值與各人喜好配置值,
Time of Update: 2014-10-18
標籤:style blog http color io os ar 使用 sp zhanhailiang 日期:2014-10-181.
Time of Update: 2014-10-16
標籤:linux shell
Time of Update: 2014-10-16
標籤:blog http 使用 strong 檔案 2014 on log amp 檔案描述符stdin:標準輸入,接收滑鼠、鍵盤或其他輸入裝置的輸入資訊,檔案描述符是1stduot:輸出所有的
Time of Update: 2014-10-28
shell條件判斷1. if條件判斷if條件判斷: if [ 條件 ]; then do something fi 多個條件: && 代表AND || 代表OR 多重判斷: if [ 條件 ];then do something elif [ 條件2 ]; then //do something else //do someshing fi#!/bin/bashread -p "Please input (Y/N) : " ynif [