Skip to content

Benjr.tw

  • Linux
    • Stress & Performance
    • Hardware Info
    • System Monitor
    • Security
    • Desktop
    • PXE
    • Filesystem Hierarchy Standard
    • Linux 開機選項
    • Linux Package Manager
    • 備份 Backup
  • Virtualization
    • Docker & Podman
    • CoreOS
  • NAS/SAN
  • Programming Language
    • Python
    • Bash shell script
    • Perl
    • PHP
    • Node.JS
    • VBA
    • javascript
    • Power Query
    • PowerShell
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • SQLite
    • MariaDB JSON

Bash shell script

Linux command – awk 參數

2017-07-042017-07-12 adminBash shell script, Linux

Loading

透過 sed 與 awk 都可以把文件做過濾和轉換成新的輸出內容.不過 sed – https://benjr.tw/97129 適合用於一整行的資料處理,而 awk 則比較適合將一整行做多個 欄位 的資料處理.先來看看 awk 的幾個範例. awk 是 mawk 的連結,兩種方式都可以 […]

Read more

Linux command – awk 的程式結構

2017-07-042017-07-12 adminBash shell script, Linux

Loading

透過 sed 與 awk 都可以把文件做過濾和轉換成新的輸出內容.不過 sed – https://benjr.tw/97129 適合用於一整行的資料處理,而 awk 則比較適合將一整行做多個 欄位(Field) 的資料處理.先來看看 awk 的幾個範例. awk 是 mawk 的連結, […]

Read more

Linux command – awk 的內建變數

2017-07-032017-07-12 adminBash shell script, Linux

Loading

透過 sed 與 awk 都可以把文件做過濾和轉換成新的輸出內容.不過 sed – https://benjr.tw/97129 適合用於一整行的資料處理,而 awk 則比較適合將一整行做多個 欄位(Field) 的資料處理.先來看看 awk 的幾個範例. awk 是 mawk 的連結, […]

Read more

Bash shell script

2017-06-302024-05-06 adminBash shell script, Linux

Loading

使用 Bash shell script 有一部分是在利用 正規表示法 處理文件的格式化,下面幾個指令都與這有關. Shell 變數 變數的 刪除與取代 https://benjr.tw/96951 變數的 測試與替換 https://benjr.tw/96998 read 從鍵盤輸入,讀取變數 h […]

Read more

grep 正規表示式

2017-06-302018-11-20 adminBash shell script, Linux

Loading

grep 是在 Linux 蠻常用的指令,主要是在一群文字資料裡搜尋 Keyword 關鍵字在哪一行. #grep -E , #grep -e -e PATTERN, –regexp=PATTERN -E, –extended-regexp 兩者的差別是 -E 支援 exte […]

Read more

Linux command – awk 的輸出語法

2017-06-132018-08-16 adminBash shell script, Linux

Loading

透過 sed 與 awk 都可以把文件做過濾和轉換成新的輸出內容.不過 sed – https://benjr.tw/97129 適合用於一整行的資料處理,而 awk 則比較適合將一整行做多個 欄位(Field) 的資料處理.先來看看 awk 的幾個範例. awk 是 mawk 的連結, […]

Read more

Linux command – sed

2017-06-082017-09-28 adminBash shell script, Linux

Loading

透過 sed (Stream EDitor) 與 awk 都可以把文件做過濾和轉換成新的輸出內容.不過 sed 適合用於一整行的資料處理,而 awk – https://benjr.tw/97139 則比較適合將一整行做多個 欄位 的資料處理.先來看看 sed 的幾個範例. 先產生一個文 […]

Read more

Bash Shell Script – select 迴圈

2017-06-072017-07-12 adminBash shell script, Linux

Loading

select select 的語法如下,他是一個無限迴圈會一直重覆讓使用者輸入資料並執行 do done 內的 script . 下面這個範例就是使用 select 這一無限迴圈,使用者可以選擇 1) A , 2) B , 3) C , 4) D ,並執行 do done 內的 script,需要使 […]

Read more

Bash Shell – source script, sh script, ./script (2)

2017-06-012018-06-14 adminBash shell script, Linux

Loading

測試環境為 Ubuntu 16.04 x64 用下面的 script 來觀察 source script, sh script, ./script 執行後各項變數是否保留. sh script 與 ./script 我開了兩個 SSH 連線,一個用來執行程式,一個用來觀察程序的變化. 一開始先檢查程 […]

Read more

Bash Shell Script – read

2017-05-082019-04-30 adminBash shell script, Linux

Loading

下面是 read 可以加的參數,他們代表什麼意思! 測試環境為 Ubuntu 16.04 x64 read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-ufd] [ […]

Read more

文章導覽

較舊的文章
較新的文章

近期文章

  • Windows – Network Sharing + Port forwarding to VM
  • Ansible – gather facts
  • Ansible – host_vars 定義特定的變量
  • Ansible 範例 – Chrony daemon
  • Ubuntu NTP Client 校時設定

近期留言

  • 「Jackson2734」於〈Ubuntu NTP Client 校時設定〉發佈留言
  • 「w」於〈Ubuntu 16.04 Server PXE 安裝〉發佈留言
  • 「admin」於〈TCP/IP 常見封包〉發佈留言
  • 「stu」於〈TCP/IP 常見封包〉發佈留言
  • 「student」於〈Linux command – tcpdump〉發佈留言

分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
  • Privacy Policy
  • 隱私權政策
Powered by WordPress | Theme: Astrid by aThemes.