Time of Update: 2014-10-16
標籤:shell unix環境進階編程 思路:(1)得到"."的i節點號,稱其為n(使用stat) (2)chdir ..(使用chdir) (3)找到inode號為n的節點,得到其檔案名稱。
Time of Update: 2014-10-15
標籤:style color ar strong sp on bs new as 1. 字串如何大小寫轉換str="This is a Bash Shell script."1>
Time of Update: 2014-10-16
標籤:style 使用 java sp 資料 on 問題 linux bs 最近又在研究這個linux的shell編程,因為對這個linux系統高度興趣,所以,一次性把這個shell編程也給學習
Time of Update: 2014-10-14
標籤:style blog color io os ar for 檔案 sp 前面已經講到,變數名只能包含數字、字母和底線,因為某些包含其他字元的變數有特殊含義,這樣的變數被稱為特殊變數。例如,
Time of Update: 2014-10-17
標籤:使用 ar strong sp 檔案 on log bs size Shell變數:1、系統變數:$n: 命令的參數,n表示參數的順序$#: 參數的個數$0: 程式名$?:
Time of Update: 2014-10-14
標籤:style blog color 使用 ar for sp div on 在迴圈過程中,有時候需要在未達到迴圈結束條件時強制跳出迴圈,像大多數程式設計語言一樣,Shell也使用
Time of Update: 2014-10-15
標籤:style blog color 使用 strong 檔案 sp div on 開啟文字編輯器,建立一個檔案,副檔名為sh(sh代表shell),副檔名並不影響指令碼執行,見名知意就好,如
Time of Update: 2014-10-09
標籤:style blog color os ar sp div 2014 art shell 擷取網關 以及修改ip 啟用網卡#!/bin/bash#autho freefei#script
Time of Update: 2014-10-09
標籤:style blog 使用 ar for 檔案 資料 sp div
Time of Update: 2014-10-08
標籤:local#!/bin/sh#根據輸入的數字進行正負數判斷。path=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATHecho "請輸入數字\n"read shuziif [ $shuzi -ge 0 ]; thenecho "您輸入的是正數"elseecho
Time of Update: 2014-10-06
標籤:io os ar for sp c on amp r 題意:很多球組成一個金字塔第x層有 x*(x+1)/ 2 個球 給你一個S
Time of Update: 2014-10-05
標籤:hdu 二分尋找 數學 題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=2446Problem DescriptionIn the 17th century, with thunderous noise, dense smoke and blazing fire, battles on the sea were just the same
Time of Update: 2014-10-05
標籤:shellHUP(1) 掛起,通常因終端掉線或使用者退出引發INT(2) 中斷,通常因CTRL+C組合引發QUIT(3) 退出, 通常因CTRL+/組合引發ABRT(6) 中止, 通常因某些嚴重的錯誤而引發ALRM(14) 警示 ,通常用來處理逾時TERM(15) 終止, 通常在系統關機時發送TSTP(20)
Time of Update: 2014-09-29
標籤:linux 營運 #!/bin/bashecho "IP:"ifconfig |grep "inet addr"|grep -v 127.0.0.1|awk '{print $2}'|awk -F ':' '{print $2}'echo "Product Name:"dmidecode |grep
Time of Update: 2014-09-28
標籤:blog 使用 ar div c log ad r as 1. 使用grep(結果帶括弧,不知道有沒有辦法僅把括弧中的內容匹配出來)$a=‘abc[edg]adfirpqu‘$echo $
Time of Update: 2014-09-27
標籤:style blog http color 使用 ar strong 檔案 sp 首先我們就不介紹shell指令碼具體是什麼東東了,這個部落格只是記錄自己學習shell指令碼的每一步。首先
Time of Update: 2014-09-21
標籤:linux shell bool 邏輯運算 1. bash裡的true和false並不是我們通常所認為的0和1。true和false是shell的內建命令,返回邏輯值。例如:$ true$ echo $?0$ false$ echo
Time of Update: 2014-10-17
Linux Shell 萬用字元、逸出字元、元字元、特殊字元,shell轉義一、linux shell萬用字元(wildcard)萬用字元是由shell處理的(不是由所涉及到命令語句處理的,其實我們在shell各個命令中也沒有發現有這些萬用字元介紹),
Time of Update: 2014-10-09
shell查看系統基本資料指令碼#!/bin/bashecho "IP:"ifconfig |grep "inet addr"|grep -v 127.0.0.1|awk '{print $2}'|awk -F ':' '{print $2}'echo "Product Name:"dmidecode |grep Nameecho "CPU
Time of Update: 2014-09-30
shell查看系統基本資料指令碼,shell基本資料指令碼#!/bin/bashecho "IP:"ifconfig |grep "inet addr"|grep -v 127.0.0.1|awk '{print $2}'|awk -F ':' '{print $2}'echo "Product Name:"dmidecode |grep Nameecho "CPU Info:&