看板 EZsoft 關於我們 聯絡資訊
※ 引述《sillycat79 (糊塗喵咪)》之銘言: : 很久以前有一個整理資料的小工具,但現在找不到 : 他可以合併多個txt檔案,也可以排除某個檔案中有的資料 : 例如: : a.txt 內容 : 1 : 2 : 3 : b.txt 內容 : 2 : 3 : 4 : 功能一:合併a,b,輸出 : 1 : 2 : 3 : 4 : 功能二:a排除b,輸出 : 1 : 不知道有沒有類似能做這兩件事情的小軟體,謝謝 下載 Windows Portable https://git-scm.com/download/win 解開後在 PortableGit\usr\bin 目錄裡有一個程式 diff.exe 功能一:合併a,b 執行 ? diff --old-group-format="%<" --new-group-format="%>" --unchanged-group-format="%=" a.txt b.txt > c.txt (以上四行請自行合併在一行打完) c.txt 就是你要的 功能二:a排除b 執行 diff --older-group-format="%<" a.txt b.txt > c.txt c.txt 就是你要的 功能三:共有的內容行 執行 diff --changed-group-format="" a.txt b.txt > c.txt c.txt 就是你要的 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.73.172.86 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/EZsoft/M.1594095549.A.FF5.html ※ 編輯: ViewMoon (42.73.172.86 臺灣), 07/07/2020 18:24:41
sillycat79: 謝謝~~ 07/09 15:35