diff -qr dirA dirB |grep -v -e keyword1 -e keyword2 |sort > diffs.txt

 

diff -r : recursively compare all files and files in subdirectories

bamil 發表在 痞客邦 留言(2) 人氣()

Linux command: 
 cp a tmp.txt
 vi tmp.txt
 
vi command:
 (cursor at 1 line before begining of where we want to copy) d1G
 (cursor at 1 line after end of where we want to copy) dG
 :x 
 
Now tmp.txt contains only the part we want.
 
Linux command:
 vi b
 (cursor at where we want to paste) :r tmp.txt
 
  
有點笨的作法, 但google了一下, 我只會這個....

bamil 發表在 痞客邦 留言(0) 人氣()

顯示行數

:set number

bamil 發表在 痞客邦 留言(0) 人氣()

  • Press the "Escape" key to enter command mode.
  • Press the double-quote character (") to enable pasting from a buffer or register

bamil 發表在 痞客邦 留言(0) 人氣()

erfc() erf() 這些 function 並沒有定義在 VS 的 cmath 中

 

bamil 發表在 痞客邦 留言(0) 人氣()

 

 

bamil 發表在 痞客邦 留言(0) 人氣()

:g/AAAA/s//BBBB/g   

就會將全文中出現的AAAA用BBBB取代.

bamil 發表在 痞客邦 留言(0) 人氣()

把 for (i=0; i<10; i++) 改成  for (i=0; i<10; i=i+1

 

bamil 發表在 痞客邦 留言(0) 人氣()

Solution:

把 [x : y] 的 range 語法改成 [x +: width] 或 [x -: width]

bamil 發表在 痞客邦 留言(0) 人氣()

Ctrl G


bamil 發表在 痞客邦 留言(0) 人氣()