Time of Update: 2014-12-24
標籤:只是我個人經常用到的,不是很全1、擷取管道前面的返回值 echo ${PIPESTATUS[0]}e.g.[email protected]:~# date1 | echo 22No command 'date1' found, did you mean: Command 'date' from package 'coreutils' (main)date1: command not found[email&
Time of Update: 2014-12-21
標籤:@1:子串削除${string#substring}從$string 的開頭位置截掉最短匹配的$substring.${string##substring}從$string 的開頭位置截掉最長相符的$substring.${string%substring}從$string 的結尾位置截掉最短匹配的$substring.${string%%substring}從$string 的結尾位置截掉最長相符的$substring.當需要構造檔案名稱的時候,
Time of Update: 2014-12-13
標籤:linux shell 編程 轉載請註明:http://blog.csdn.net/wujysh1、 查看當前系統下使用者 shell 定義的環境變數的值。2、 定義變數 AK 的值為 200,並將其顯示在螢幕上。3、 定義變數 AM 的值為 100,並使用 test 命令比較其值是否大於 150。4、 建立一個簡單的 shell
Time of Update: 2014-12-11
標籤:style blog color sp div log bs amp as 1 #/bin/sh 2 3 TASK_LIST=$1 4 len=`wc -l $TASK_LIST |
Time of Update: 2014-12-02
標籤:style 主機 資訊 開啟ESXi的ssh後,在主機摘要上會提示有警告資訊;650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/54/41/wKioL1R9Zj_iQDD2AACxLMlbQlw314.jpg" />解決辦法如下:vSphere Client登入到ESXi主機;點擊所選主機,依次選擇"配置"→"進階設定"65
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
標籤:des style io ar color os sp 檔案 on 最近在shell中想調用MySQL的語句查詢結果,卻出現了一個令人詫異的結果這是MySQL中的表資料在這個表中存了一條s
Time of Update: 2014-11-26
標籤:style blog http io ar color os sp for 1.查看記憶體從大到小排列ps -e -o "%C : %p : %z : %a"|sort -k5
Time of Update: 2014-11-23
標籤:bash shell 指令碼 一 注意事項1.指令碼的開頭一行為 :#!/bin/bash聲明這個指令碼需要的shell的名稱2.程式中出了"#!"之外的其他以#開頭的都是注釋內容3.為了方面的使用系統命令,可以在程式的開始部分設定主要環境變數例如PATH4.指令碼程式的運行方法:sh example.sh 或者類似 bash
Time of Update: 2014-11-20
標籤:shell bash 變數 variableName=value等號左右不能有空格變數內容有空格需要用"或者‘括起來,但是 v="hello $name" $保持原有功能,單引號則不行,v="hello ‘$name‘"純文字可用轉義符\將特殊字元轉成普通文本 `命令`,$(命令) ,在文本中提供命令執行資訊變數累加,
Time of Update: 2014-11-21
標籤:style blog http ar color os 使用 sp strong bash shell命令與監測的那點事之df與du 前兩篇介紹了bash
Time of Update: 2014-11-20
標籤:快速鍵 緩衝區 crt 使用快速鍵,可減少滑鼠點擊的次數,從而提高效率,下面是總結的shell下的快速鍵:Ctrl+a
Time of Update: 2014-11-20
標籤:style blog http ar color 使用 sp strong 檔案 bash
Time of Update: 2014-11-14
標籤:style io color ar os 使用 sp for strong 下面是最近學習shell
Time of Update: 2014-11-15
標籤:shell utf-8 方法1:使用linux iconv將utf-8日誌轉為gbk編碼的檔案,然後gbk環境下統計資料。utf8(){ LOG_FILE="/lcims/crontab_shell/outfile/lan_wlan_wo/SocketMain.log141114_lan1"
Time of Update: 2014-12-04
標籤:style http io ar color os 使用 sp for WinLicense提供了最強和具伸縮性的技術,使開發人員可以安全地分發他們軟體的試用版和完全版。下面介紹WinLi
Time of Update: 2014-12-25
Shell 加密之 shc 漏洞,shell加密shc漏洞近期工作一直編Shell 指令碼給客戶使用,難免會碰到一些敏感資訊不想讓客戶知道,於是採用Shc 指令碼加密方式編譯出二進位檔案提交至客戶使用,發現SHC加密會出現至命漏洞。本文章針對該漏洞方法進行描述:SHC 版本:shc-3.8.3shell 指令碼代碼量:300行+ shell 指令碼邏輯處理較為複雜SHC 編譯參數:shc -v -T -r -f
Time of Update: 2014-12-19
shell編程式控制制結構:expr、let、for、while、until、shift、if、case、break、continue、函數、select,exprcontinue1、expr計算整數變數值s=`expr 2 + 3`運算子號和參數之間要有空格分開;2、let命令let s=(2+3)*4 echo $s 3、for語句for 變數 in 列表do命令列(通常用到迴圈變數)done#!/bin/bashfor var in one
Time of Update: 2014-12-14
Linux shell mac 地址轉換 convert with sed,convertsed把 0024.b20b.693f 地址 轉換成 00:24:b2:0b:69:3f1.點號分隔的[root@hzswtb2-mpc ~]# echo "0024.b20b.693f" | sed -r 's/\b(..)(..)\b/\1:\2/g;s/\./:/g'00:24:b2:0b:69:3f2.若是冒號分隔的,把