Linux讀書筆記

來源:互聯網
上載者:User

type     \     

echo     unset     set     export     

環境變數:     HOME     SHELL     HISTSIZE     MAIL     PATH     LANG     RANDOM     PS1     $     ?     

影響結果的語系變數:     locale

變數鍵盤讀取、數組與申明:     read     array     declare

與檔案系統及程式的限制關係:     ulimit

變數內容的刪除、替代與替換:

刪除

${變數#關鍵字}     僅刪除最短的那個     前->後

${變數##關鍵字}     僅刪除最長的那個     前->後

${變數%關鍵字}      最短     後->前

${變數%關鍵字}      最長     後->前

替換

${變數/舊字串/新字串}     替換第一個     

${變數/舊字串/新字串}     全部替換

變數測試與內容替換

bash登入與歡迎資訊

/etc/issue     /etc/motd

bash環境設定檔

/etc/profile

~/.bash_profile     ~/.bash_login     ~/.profile

讀入環境設定檔

source     .

終端機環境設定

stty     set

資料流重新導向

stdin:0     stdout:1     stderr:2

/dev/null

2>&1

eg:cat > catfile << "eof"     輸入eof時,結束輸入,而不再輸入 ^d

命令執行判斷依據

;

&&     ||     $?

管道

選取命令:

cut -d '分隔字元' -f fields     cut -c 字元範圍

eg: echo $PATH | cut -d ':' -f 1,3;     echo $PATH cut -c 12-;     

grep [-acinv] [--color=auto] '尋找字串' filename

排序命令:

sort [-fbMnrtuk]

uniq [-ic]

wc [-lwm]

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.