Time of Update: 2014-07-15
標籤:linux shell fork炸彈 .(){ .|.& };. 或者 :(){ :|:& };: 這13個字元由Jaromil ,在 2002 年設計了最為精簡的一個 fork炸彈的實現。.() 說明下面要定義一個函數,函數名為小數點,沒有選擇性參數;{
Time of Update: 2014-06-17
標籤:com strong 使用 檔案 資料 set 一. 特殊檔案: /dev/null和/dev/tty Linux系統提供了兩個對Shell編程非常有用的特殊檔案,/dev/null和/dev/tty。其中/
Time of Update: 2014-07-09
標籤:des blog http java 使用 檔案 前言: 對網路相關的知識, 做下筆記. 包括IP地址A/B/C的分類, 靜態地址的配置/DNS配置, 以及網卡相關資訊查看.*) A/B/C/D類網路地址的劃分IP地址=網路地址+主機地址 或
Time of Update: 2014-07-08
標籤:style blog http color 使用 檔案 man bash: Special Parameters The shell treats several parameters specially.
Time of Update: 2014-07-03
標籤:shell 指令碼 快速 ssh 登入主機 如果你也是以Linux 為工作環境的童鞋,那麼此文真是捷報!因為我的學習/工作中(特別是最近玩耍樹莓派)經常會使用到ssh 登入其他主機,而每次使用ssh 登入都需要輸入老長一大串讓我很煩,所以我寫了這個指令碼來簡化我的ssh 過程。使用這個指令碼,如果我想登入一台機器,我只要使用 $~/easy_ssh.sh
Time of Update: 2014-07-01
標籤:alias bash shell if 異常 1. 先介紹下alias(別名)的用法 alias la=‘ls -a‘ alias b=‘cd ..‘ 等等 alias 是個好東西,可以在用shell時省很多時間2.
Time of Update: 2014-07-01
標籤:使用 div 字串 shell 指令碼 進程 $0 :指令碼名字$1 - $9 :位置參數 #2 - #9${10} :位置參數 #10$# :位置參數的個數"$*" :所有的位置參數(作為單個字串)"[email protected]" :
Time of Update: 2014-06-30
標籤:blog http 使用 strong 檔案 資料 shell之文本過濾(awk)分類: linux shell指令碼學習2012-09-19
Time of Update: 2014-07-07
標籤:color for io type amp file alias ll=‘ls -al‘use_color=false# Set colorful PS1 only on colorful terminals.# dircolors --print-database uses its
Time of Update: 2014-06-27
標籤:apache 日誌分析 shell 一、首先將apache日誌按天切割 vi /etc/httpd/conf/httpd.confErrorLog “|rotatelogs /var/log/httpd/%Y%m%derror_log 86400 480″CustomLog “|rotatelogs
Time of Update: 2014-08-08
標籤:blog http 使用 strong 檔案 for ar div 1
Time of Update: 2014-08-03
標籤:linux指令碼選擇結構bash之選擇結構 選擇程式結構用於判斷給定的條件,根據判斷的結果判斷某些條件,根據判斷的結果來控製程序的流程。(關於shell指令碼中選擇結構的詳細使用方法請查看協助文檔) if語句的幾種結構 (一)if 判斷條件
Time of Update: 2014-07-29
標籤:http 使用 os strong 檔案 io for 2014 本文參考自《Unix/Linux編程實踐教程》,
Time of Update: 2014-07-16
標籤:blog http 2014 re c log #!/bin/bash#提示使用者輸入 echo -n "Please enter number"read n #讀入輸入的值放到變數n中sd=0rev=""on=$n #將變數n的值儲存到變數on中,方便以後用到echo
Time of Update: 2014-07-10
標籤:${ } `` $() shell $()、``用來作命令替換${ }用來作變數替換(以下內容來自shell十三問) (1). 變數的界定 $ A=
Time of Update: 2014-07-09
標籤:sedsed:稱為流編輯器,也稱為行編輯器。sed處理過程:sed讀取源檔案中的一行,並將其放在臨時緩衝區中,這個緩衝區稱為模式空間,使用相應的模式對模式空間進行處理,並將處理的結果顯示到螢幕上,並不會影響源檔案,處理結束後,將模式空間中的內容顯示至螢幕。sed格式:sed [options] ‘AddressCommand‘ file ...options:-n:靜默模式,不顯示模式空間中的內容,預設顯示預設空間中的內容。常和p命令一起使用。-i:
Time of Update: 2014-08-02
BASH Shell 簡易進度條小函數,bashshell不多說,直接上指令碼。# processbar <current> <total>processbar() { local current=$1; local total=$2; local maxlen=80; local barlen=66; local perclen=14; local format="%-${barlen}s%$((maxlen-barlen))s"
Time of Update: 2014-07-31
Linux下常用的shell命令記錄,linuxshell命令硬體篇CPU相關lscpu #查看的是cpu的統計資訊.cat /proc/cpuinfo #查看CPU資訊詳細資料,如每個CPU的型號,主頻等記憶體相關free -m #概要查看記憶體情況 這裡的單位是MBcat /proc/meminfo #查看記憶體詳細資料磁碟相關lsblk
Time of Update: 2014-07-23
shell script 自動化測試架構,shellscriptshUnit2的開發背景shUnit2是基於log4sh SHELL自動化測試對應而開發的, 使用方式和JUnit類似.準備1. 下載shUnit2wget -P ~/download http://shunit2.googlecode.com/files/shunit2-2.1.6.tgz2. 解壓tar -xzvf ~/download/shunit2-2.1.6.tgz3.
Time of Update: 2014-07-09
一個帶參數的Shell的例子,參數shell例子#!/bin/bash# Program:# LZSH server log filter# History:# 2014/07/01 Kom First release# 2014/07/03 Kom Remote and multi-param support# Set PATHPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/