如何git diff只从一行中的某个偏移列比较,例如下面的两个日志应该是不不同
index 7e2d6d7..cb88ce6
--- a/var/log/lightdm/lightdm.log
+++ b/mnt/OSraw/var/log/lightdm/lightdm.log
@@ -1,46 +1,175 @@
-[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
-[+0.00s] DEBUG: Starting Light Display Manager 1.32.0, UID=0
-[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
-[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
-[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
-[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
-[+0.00s] DEBUG: Registered seat module local
+[+0.01s] DEBUG: Logging to /var/log/lightdm/lightdm.log
+[+0.01s] DEBUG: Starting Light Display Manager 1.32.0, UID=0
+[+0.01s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
+[+0.01s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
+[+0.01s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
+[+0.01s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
+[+0.01s] DEBUG: Registered seat module local
请帮帮忙!
1条答案
按热度按时间4smxwvx51#
您正在查找
textconv
差异。虽然文档说它是用于区分二进制文件的,但“二进制”在这里的意思实际上只是任何难以以其原始形式使用的东西。sed
在diff看到它们之前从行中去掉带括号的单词,只白色固定数量的初始列,您可以执行类似s,..........,----------,
的操作。