Time of Update: 2014-12-07
標籤:萬用字元 case 隨機數 上篇博文介紹了while語句,while的基本使用以及死迴圈還有檔案測試方法等以上內容,還是那句話如果想全部掌握則需要多次練習。 這篇博文來介紹一下case語句,精簡的if語
Time of Update: 2014-11-30
標籤:征服shell 要寫一個計算質數(素數)的指令碼。汗650) this.width=650;" src="http://img.baidu.com/hi/jx2/j_0016.gif" alt="j_0016.gif" />自己到現在都對質數沒有概念,不知道該怎麼寫。 在百度裡搜到了計算質數的指令碼,可是看不懂啊>_< 。 沒辦法^_^ 繼續努力吧
Time of Update: 2014-11-28
標籤:添加帳號系統內容centos6.5[[email protected] wang]# uname -r2.6.32-431.el6.i686正式添加帳號:[[email protected] /]# useradd wang #添加使用者wang[[email
Time of Update: 2014-11-26
標籤:linux tomcat shell 服務 1、下載tomcat 從http://tomcat.apache.org/download-70.cgi連結下載linux版本(tar.gz)2、解壓,上傳及賦許可權
Time of Update: 2014-11-14
標籤:style http ar os 使用 sp for on 2014 今天用三種不同的方式實現了Shell指令碼列印的九九乘法表,代碼如下 方法1:使用for迴圈(a.sh)
Time of Update: 2014-11-17
標籤:shell 變數 間接引用 在編寫shell指令碼的過程中相信大家都會遇到這樣的情境:#!/bin/sh#log_1="xxxxxx"log_2="yyyyyy"log_3="zzzzzz"for num in {1..3}do log=log_$num #此時你想把l
Time of Update: 2014-11-08
標籤:io ar sp 檔案 on bs nbsp c 字串 1. 字串掐頭去尾 #,
Time of Update: 2014-11-05
標籤:shell 變數 shell學習 Shell
Time of Update: 2014-11-04
標籤:blog http ar 使用 sp strong 檔案 div on http://blog.csdn.net/gyanp/article/details/7258356經常可以在一些指
Time of Update: 2014-11-04
標籤:shell一、for迴圈[[email protected] shell]# cat for.sh #!/bin/bashfor i in `seq 1 10`; doecho "$i" done通過這個指令碼就可以看到for迴圈的基本結構:for 變數名 in 迴圈的條件; do commanddone[[email protected] shell]
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-31
標籤:shell test運算式650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/4D/83/wKioL1RSSRHxRte-AAFhU-dm6eA664.jpg" style="float:none;" title="test1.jpg" alt="wKioL1RSSRHxRte-AAFhU-dm6eA664.jpg" />650) this.width=650;" src="http://s3.51cto.com/wyfs02
Time of Update: 2014-10-31
標籤:style 使用 sp on bs ef linux size as 給你個全的,你在Linux環境下多試下就明白了:$0 這個程式的執行名字$n 這個程式的第n個參數值,n=1..9$*
Time of Update: 2014-10-29
標籤:style blog http ar sp 檔案 資料 on art linux 下shell 編寫指令碼:
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-12-05
標籤:style blog http ar on 檔案 2014 log 代碼 什麼是shell?ls
Time of Update: 2014-12-06
linux shell編程之簡單shell及windows檔案相互轉化,什麼是shell?ls 出現一堆目錄?執行過程是怎樣的?ls是應用程式,shell將其轉化為01代碼轉給核心,核心轉給硬體,之後再返回!shell同樣是強大程式設計語言!查看系統支援哪些shell?命令名稱:echo參數: -e 支援反斜線字元轉化一個小例子:開始編寫一個shellshell執行:下面來說關於window和linux檔案相互轉化轉化命令:
Time of Update: 2014-12-04
shell指令碼使用的幾點總結(1),csh的指令碼可以調用bash的指令碼,反之亦然。(2).如何調用其它指令碼中定義的變數及函數。(3).定義的變數,預設為全域變數。需要指定local 來申明局部變數。列:local value="Value", 該變數不能再其它函數或是檔案中調用。(4).執行即載入(包含)l例:在use.sh中調用test.sh中的定義的變數及函數。test.sh定義如下:#!/bin/shfunction func{ echo
Time of Update: 2014-11-28
linux (centos) 安裝tomcat (用shell指令碼安裝為服務),centostomcat1、下載tomcat 從http://tomcat.apache.org/download-70.cgi連結下載linux版本(tar.gz)2、解壓,上傳及賦許可權 解壓,用WinSCP把解壓的安裝檔案上傳到/home/software/tomcat目錄 並用