看板 Editor 關於我們 聯絡資訊
http://www.levenez.com/unix/guru.html Unix hierarchy有說 hacker writes C code with cat > and compiles with !cc guru writes assembly code with cat > wizard writes device drivers with cat > 沒錯,cat也可以當編輯器XD cat > file 馬上就會進入編輯狀態,^D兩次離開編輯 當你想做一串指令(或是perl script or shell script) 又不想用\來跳脫行時 就可以 cat | perl print "hello world!\n"; ^D 對於進行一些簡單的測試什麼的再簡單也不過了 我以前對command line的了解就只是夠用就好 只有vim有稍微深入一點研究(版上許多人都比我厲害:P) 不知道各位行家還有什麼奇怪的編輯技巧可以露兩手看看? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.46.30
dryman:雖然我知道有perl -e 但我還是喜歡cat | perl 09/29 23:24
tkcn:ctrl-x + ctrl-e 呢? 09/30 00:27
dryman:突然發現只有perl的話就等同cat|perl...:P 09/30 08:54
dryman:二樓..沒效果耶@ @ 09/30 08:55
kornelius:ctrl-x xtrl-e 是 bash 才有, EDITOR 變數要設置 09/30 09:40
kornelius:echo ? 09/30 09:41
letoh:cat 很好用阿 10/01 23:28