Time of Update: 2014-09-25
標籤:des blog http io os 使用 java ar for 本文通過Java代碼調用Shell指令碼並傳入參數實現DB2資料庫表匯出到檔案,代碼如下:import java.
Time of Update: 2014-10-14
標籤:shell 體驗 日誌Shell 指令碼在開發中的體驗這段時間在開發一個程式,程式輸出有很多日誌。有時候要通過日誌來分析出錯的問題。單獨的查看效率太低分析不到什麼。於是乎就想到了Shell。 記錄檔在安卓的手機裡面!開發環境 Fedora 、MacOS。手機Nexus4,Nexus5。開發工具 vim +
Time of Update: 2014-10-15
標籤:unix環境進階編程 shell ls命令的R參數代表遞迴的列出所有子檔案夾中的所有檔案,1表示每一行只顯示一個檔案或檔案夾,f表示不排序即輸出,F表示在每項的輸出的最後根據其檔案類型相應的加上*/=>@|字元。通過c語言實現ls -R1fF命令的效果,其原始碼如下:#include <stdio.h>#include
Time of Update: 2014-10-13
標籤:io 使用 ar for strong 檔案 資料 sp div 函數是被賦予名稱的指令碼代碼塊,可以在代碼的任意位置重用。每當需要在指令碼中使用這樣的代碼塊時,只需引用該代碼塊被賦予的函
Time of Update: 2014-10-14
標籤:style blog color io 使用 ar sp div on if 語句通過關係運算子判斷運算式的真假來決定執行哪個分支。Shell 有三種 if ... else 語句:if
Time of Update: 2014-10-14
標籤:style blog color io os 使用 java sp div case ... esac 與其他語言中的 switch ... case
Time of Update: 2014-10-10
標籤:http io os 使用 檔案 sp div 2014 amp unix shell中(),[]和[[]]的區別 1.
Time of Update: 2014-10-12
標籤:shell 時間 最近寫了一個小程式,需要用到時間,遍曆作為目錄的一部分#!/bin/bashfor i in {1..30}dodate=`date +%Y/%m/%d -d " $i days ago " `echo $datedonefor迴圈,取最近n天的日期。核心就是date=`date +%Y/%m/%d -d " $i days ago " `結果,
Time of Update: 2014-09-27
標籤:c linux r as 程式 方法 d shell 第一個 以下列舉了$的常用方法 $n
Time of Update: 2014-10-09
標籤:指令碼【著作權聲明:轉載請保留出處:blog.csdn.net/gentleliu。Mail:shallnew at 163 dot com】從字面上可以看出,paste命令和cut命令功能相反,cut命令是從檔案行中取出欄位,而paste命令是將檔案行資訊合并到一行。paste命令使用方法為:paste -d -s -file1 file2-s選項是將檔案行合并成一行。比如現有如下檔案:# paste 1.filenameallenbobchrisdyao# paste 1.file -
Time of Update: 2014-10-01
標籤:使用 c 工作 r linux bs as 使用者 ip mac上的終端使用的是Bourne-Again
Time of Update: 2014-10-01
標籤:zabbix shell agent #!/bin/bash#./zabbixagent.sh 172.16.103.16 172.16.103.134#$1 master address, $2 local_listen_ip groupadd zabbix &n
Time of Update: 2014-09-30
標籤:shell指令碼啟動程式 我們都知道jvm本身提供了很多的命令供使用者調用,有時候我們需要使用這些命令寫一些指令碼來執行我們的程式,首先說下以下指令碼的目錄結構:bin 指令碼存放處lib 依賴的jar包存放處conf 依賴的設定檔存放處打好的可運行jar放在目前的目錄#!/bin/bashexport JAVA_HOME=/usr/javaexport PATH=$JAVA_HOME/bin:$PATH#--------------
Time of Update: 2014-09-30
標籤:style 使用 sp c on r 時間 size bs Shell中取時間格式方法2007-09-13 15:35常用date的顯示格式:date +%F
Time of Update: 2014-09-29
標籤:des http io os 使用 ar for 檔案 sp 第一部分:Hadoop Bin後面根據項目的實際需要Hadoop Bin 包括:Hadoop
Time of Update: 2014-09-29
標籤:關於shell指令碼的排錯今天寫了一個shell監控的指令碼主要通過shell 指令碼結合zabbix 來監控keepalived的運行狀態。 直接說指令碼指令碼名字: check_keepalived.sh #!/bin/bashUNM=`ps -ef|grep keepalived|wc -l`if [ $UNM -gt 2 ] ;then&nbs
Time of Update: 2014-09-28
標籤:linux shell script 指令碼編程 命令 簡單的樣本Shell程式樣本1.#!/bin/bash#This is to show what a shell script looks likeecho "Our first example"echo # This inserts an empty line in
Time of Update: 2014-09-24
標籤:shell隨記-eq 等於-ne 不等於-gt 大於-ge 大於等於-lt 小於-le 小於等於 seq 1 30 從1到30的數字touch -mt201003030303.03 $Dir 修改目錄的時間格式stat /tmp/1.dir 查看修改時間LINES=`grep ‘^#‘ $file |wc
Time of Update: 2014-09-29
Shell編程入門(第二版)(中),shell編程入門變數測試語句-test作用:用來測試變數是否相等,是否為空白,檔案類型等。格式:test 測試條件 或 []#範圍:整數,字串,檔案 1)整數測試: test int1 -eq int2 測試整數是否相等 test int1 -ge int2 測試int1是否>=int2 te
Time of Update: 2014-09-29
Linux shell編程 基礎Regex,shellRegexLinux