➜ ~ cat test.txt
12
13
13
13
13
13 13
13
13
13
➜ ~ seq 14 1 20 | while read var;do awk '/13/{c++;if(c==2){gsub("13",'"${var}"');}}1' test.txt > test.tmp && mv test.tmp test.txt ;done
➜ ~ cat test.txt
12
13
14
15
16
17 17
18
19
20
➜ ~ cat test.txt
12
13
13
13
13
13 13
13
13
13
➜ ~ seq 14 1 20 | while read var;do awk '/13/{c++;if(c==2){gsub("13",'"${var}"');}}1' test.txt > test.tmp && mv test.tmp test.txt ;done
➜ ~ cat test.txt
12
13
14
15
16
17 17
18
19
20
繼續運行 ?* 回憶上次內容 上次使用shell環境中的命令 命令 作用 c
繼續運行 🥋 回憶上次內容 上上次 真寫了 萬行 代碼 這 萬行 代碼 都是寫在 明面 上的 這次 使用git命令 下載了 github上面的倉庫
一、幾個基本概念 登錄用戶(login user):通過登錄方式進入系統的用戶,強調登錄身份。 當前用戶(current user):執行一個進程或者命令時所使用的用戶身份,強調執行身份。 舉
一、幾個基本概念 tty(Teletypewriter) 來源於“電傳打印機”,Linux系統中則是終端設備的統稱,同時也代指操作系統中支持終端設備的tty子系統。 console(控制檯)