Time of Update: 2014-12-02
標籤:blog http os 使用 sp 檔案 log bs 代碼 轉載:http://imysqldba.blog.51cto.com/1222376/616805shell
Time of Update: 2014-12-02
標籤:shell Regex sed 常接觸shell指令碼語言的,經常會看到一個shell命令接一堆亂七八糟的option,類似這樣的 sed -e "s/^[^\-]*-//"
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-12-01
標籤:shell指令碼 wlile if case 迴圈語句實驗要求:1、編寫一個名為sum.sh的指令碼,提示使用者輸入一個小於100的整數,並計算從1到該數之間所有整數的和2、編寫一個名為tar.sh的指令碼,用來解壓.tar.gz或.tar.bz2格式的壓縮檔,要求採用case語句實驗步驟:(一)vi sum.sh#!/bin/bash# this is sumwhile : #迴圈條件為真,等同於while true,如果沒有exit
Time of Update: 2014-12-02
標籤:des io ar os sp java for on 2014 概述: Process類是一個抽象類別(所有的方法均是抽象的),封裝了一個進程(即一個執行程式)。 P
Time of Update: 2014-12-03
標籤:des style http io ar os 使用 sp for
Time of Update: 2014-12-02
標籤:ping ssh 伺服器 測試大量伺服器是否能夠ping的通,如果能夠ping的通時候可以ssh上去。前提:條件是跳板機和要測試的伺服器之間要建立信任關係。#!/bin/bashdeclare -a IPIP[0]=192.168.30IP[1]=192.168.32IP[2]=192.168.34for IP3 in ${IP[*]}do for((i=1;i<=100
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-28
標籤:style blog http io ar color os 使用 sp 一、問題問題很簡單,看下面一段tmp.sh代碼:#!/bin/shx="this is the initial
Time of Update: 2014-11-29
標籤:shell sed linux 1.在命令列定義編輯器命令命令格式 sed options script filesed不會修改文字檔的資料,他只會將修改後的資料發送到STDOUT。2.在命令列上使用多個編輯器命令將命令放在一個檔案中3.s命令使用替換標記.數字代表新文本將替換第幾處模式比對的地方.g,替換所有的。p,原來的內容列印出來。w file,將替換的結果寫到檔案。-
Time of Update: 2014-12-02
標籤: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
標籤:des style io ar color os sp 檔案 on 最近在shell中想調用MySQL的語句查詢結果,卻出現了一個令人詫異的結果這是MySQL中的表資料在這個表中存了一條s
Time of Update: 2014-11-28
標籤:shell ubuntu bash gnu linux 上篇文章只要是講了Linux一些基本概述。 我們這次開始打好命令列操作的基礎,以後再靠一些圖形化的操作來提升我們的工作效率。
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-20
標籤:shell bash awk 萬用字元與Regex的區別萬用字元是bash原生支援的文法,Regex是處理字串的一種表示方式, Regex需要支援的工具支援才可以語系設定 : export LANG=Cgrep alias 設定 : grep --color=autogrep 的一些進階參數grep [-A] [-B] ‘搜尋字串‘ filename
Time of Update: 2014-11-20
標籤:style blog http ar color 使用 sp strong 檔案 bash
Time of Update: 2014-11-18
標籤:style http io color ar os 使用 sp java 1.Shell本身是一個用C語言編寫的程式,它是使用者使用Unix/Linux的橋樑,使用者的大部分工作都是通過S
Time of Update: 2014-11-14
標籤:style http ar os 使用 sp for on 2014 今天用三種不同的方式實現了Shell指令碼列印的九九乘法表,代碼如下 方法1:使用for迴圈(a.sh)
Time of Update: 2014-11-15
標籤:shell防止其他人暴力破解密碼,如果有人嘗試輸入密碼錯誤次數到達5次則拒絕此IP訪問ssh服務。#!/bin/bashlastb | awk ‘{print $3}‘ | uniq -c | sort -r > a.txtsed -ri ‘[email protected]^[[:space:]][email protect
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目錄 並用