Time of Update: 2017-01-13
每次建立一個新的SVN版本庫總感覺很繁瑣,所以寫了段指令碼來把這個過程自動化,詳細代碼如下: 代碼如下複製代碼 #!/bin/bash# by www.111cn.netecho -n "Enter SVN name :"read svn_name/usr/bin/svnadmin create /svnroot/$svn_nameif [ $? -eq 0 ]; then #
Time of Update: 2017-01-13
系統:centos 5.x指令碼內容: 代碼如下複製代碼 cat make_room.sh#!/bin/bash#size=`df -hP|grep /dev/mapper/VolGroup00-LogVol00|awk '{print $4}'|cut -f 1 -d "G"`size=`df -mP|grep /dev/mapper/VolGroup00-LogVol00|awk '{print $4}'`file="/root/
Time of Update: 2017-01-13
在Python中,有很多模組都可以實現並發編程,比如 threading, processing, eventlet 與 Stackless Python 等。那麼對於Shell而言,又如何?呢?其實原理很簡單,我採用的方法是:1. 將需要執行的任務分批放入後台執行;2. 將後台執行的命令結果匯總到指定的檔案中;3.
Time of Update: 2016-10-20
標籤:1、
Time of Update: 2016-09-15
標籤:楊文 伺服器 master server 資料庫 關鍵字 防偽碼:防止誤刪系統資料庫,定時備份你我更安心!
Time of Update: 2016-09-07
標籤:[[email protected] wyb]# cat test10.sh #!/bin/bash#使用for迴圈在/test10目錄下通過隨機小寫10個字母加固定字串oldboy大量建立10個html檔案dir=/root/wyb/test10/[ ! -d $dir ] && mkdir -p $dirfor i in `seq 10`do touch $dir`echo $RANDOM|md5sum|cut -c
Time of Update: 2016-08-12
標籤:#!/bin/sh# Database infoDB_USER="batsing"DB_PASS="batsingpw"DB_HOST="localhost"DB_NAME="timepusher"# Others varsBIN_DIR="/usr/bin" #the mysql bin pathBCK_DIR="/mnt/mysqlBackup" #the backup file directoryDATE=`date +%F`# TODO#
Time of Update: 2016-09-12
標籤:英文字母 export 單引號 雙引號 子程式 /bin/bash是Linux預設的shell變數的設定、讀取、刪除 樣本: name=zhangsan echo $name unset name可以查看一下環境變數 echo
Time of Update: 2017-01-12
標籤:shell和awk數組awk終於能入門了,所以整理了該文章,內容大多來自網上。一、bash支援一維數組(不支援多維陣列),沒有限定數組的大小。在shell中,用括弧來表示數組,數組元素用空格符號分割開。類似於C語言,數組元素的下標由0開始編號。擷取數組中的元素要利用下標,下標可以是整數或算術運算式,其值應大於或等於01. 定義數組數組名array,元素a b c[[email protected]~]# array=(a b&nb
Time of Update: 2017-01-11
標籤:js目前看到這裡,還不懂什麼是單頁應用,這不就是一個普通的點擊滑開收縮的動畫而已……作者寫的那麼複雜666請轉載此文的朋友務必附帶原文連結,謝謝。原文連結:http://xuyran.blog.51cto.com/11641754/1891022spa.html:<!DOCTYPE html><html><head><meta charset="UTF-8"><title></title><l
Time of Update: 2017-01-09
標籤:idt cbo padding out log .exe trace keyword top命令 在實際項目中,Java有時候需要調用C寫出來的東西,除了JNI以外,我認為一種比較好的方法
Time of Update: 2016-12-31
標籤:字串匹配 匹配 生產環境 hello ++ lin 元素 指令碼 示範 前段時間和幾位同事討論過一個問題:Shell指令碼裡面怎樣把一個數組傳遞到awk內部進行處理?當時沒有找到方法。前兩
Time of Update: 2016-11-04
標籤:todo 1.2 bre span img png ati auto .com 原理圖:package suanfa;public class shellInsert {
Time of Update: 2016-10-29
標籤:互動 ace name python3 sys div 傳遞 pre pen 需求:
Time of Update: 2016-10-27
標籤:隨機 隨機數 nbsp 產生 shell ret ash while 不同 #!/bin/bash#declare -a ARRAYread -p "Please input num[1-
Time of Update: 2016-10-21
標籤:使用windows power shell建立ds13伺服器使用windows power shell建立DS13伺服器web頁面先建立:虛擬雲端服務(ServiceName): zampdmp-ds 虛擬網路(SLB/VPC Operations and Maintenance SystemName): az-dmpnetwork建立DS13,附件800G磁碟powershell命令如下:New-AzureStorageAccount
Time of Update: 2016-10-22
標籤:jenkins最近公司把jenkins搭建在windows上面,但是發布是要發布到linux伺服器上,所以在自動部署上面會有執行shell命令的問題,遂找了一下;發現jenkins有個shell指令碼的外掛程式:shell pluginThis plugin executes shell commands remotely using SSH protocol.安裝這個外掛程式,然後到構建任務裡面選擇構建,到構建後操作裡面,會發現有一項是:Excute shell script on
Time of Update: 2017-01-09
標籤:success 名稱 下載 lis aclocal end toc 輸入密碼 沒有許可權 一、安裝說明以CentOS 5為例1、安裝必要的開發包
Time of Update: 2016-12-28
標籤:註冊 網路 帳號 jpg 教程 index 它的 bcb 工具 不經意的時候看到路由器裡面有個動態網域名稱,後來網上一查知道是可以建立個人網站,然後讓網路上的其它使用者可以訪問自己開設的伺
Time of Update: 2016-09-21
記一次bash shell編寫指令碼內容如下: 目的是監測mongo的串連數 達到一定的串連數後,重啟。#!/bin/bash#source /etc/profileconn=`/usr/bin/mongo --quiet db.serverStatus().connectionsexitEOF`conn1=${conn#*:}curr=${conn1%,*}#PID=$(ps -ef|grep "mongodb"|grep -v grep|awk '{print $2}')echo