我正在使用diff -urN
来比较两个目录并创建一个补丁,例如:
diff -urN ../resources-original/ogc ogc > ../../../src/main/patches/ogc.patch
该修补程序包含---
和+++
行中的日期:
--- ../resources-original/ogc/wms/1.3.0/capabilities_1_3_0.xsd Sun Jul 22 03:59:38 2012
+++ ogc/wms/1.3.0/capabilities_1_3_0.xsd Sun Jun 12 19:59:29 2016
是否有可能取消这些日期?
答案 0 :(得分:1)
也许像
awk '/^(---|\+\+\+)/ { sub(" " $(NF-5) " " $(NF-4) " " $(NF-3) " " $(NF-2) " "$(NF-1) " " $NF, " Thu Jan 1 00:00:00 1970") }1'