По какой-то причине diff не отвечает должным образом на параметр -w;два файла, каждый из которых идентичен, за исключением одной новой строки в конце заголовка XML.
Я вызываю diff с параметром -w, например:
diff -w old_file.xml new_file.xml
# head -n4 old_file.xml
:
<?xml version="1.0" encoding="utf-8"?><survey audio_access_number="" custom="" name="test_conditionFormula" title="" type="CATI"><section id="1" loopover="None" notes="" startrecording="true" title="1">
<page id="1_Q1" loopover="None" notes="" title="1_Q1"><question id="Q1" number="Q1" style="vertical" text="1" uid="94">
<single id="single_409" number_response_columns="1" response_list="Q1_L1"/>
<instructions>Please select one</instructions>
# head -n4 new_file.xml
:
<?xml version="1.0" encoding="utf-8"?>
<survey audio_access_number="" custom="" name="test_conditionFormula" title="" type="CATI"><section id="1" loopover="None" notes="" startrecording="true" title="1">
<page id="1_Q1" loopover="None" notes="" title="1_Q1"><question id="Q1" number="Q1" style="vertical" text="1" uid="94">
<single id="single_409" number_response_columns="1" response_list="Q1_L1"/>
Почему они отличаются друг от друга, учитывая флаг diff?