Error in output

  • 1
  • Problem
  • Updated 7 months ago
line "auto swp55" in /etc/network/interfaces changes to "@@ -255,21 +255,21" after committing changes with NCLU to swp24. Did anyone see it before?
Photo of Sharon Tubi

Sharon Tubi

  • 80 Points 75 badge 2x thumb

Posted 7 months ago

  • 1
Photo of Eric Pulvino

Eric Pulvino, Official Rep

  • 4,082 Points 4k badge 2x thumb
NCLU shows changes with the 10 lines preceding and following the line(s) that have changed. What you are calling attention to here is NCLU telling you there is a second set of changes... this style of representing changes is common for outputs that use the Linux diff command to show changes. See this question for better info on how to read and interpret the output --> https://unix.stackexchange.com/questions/81998/understanding-of-diff-output  . Use the "cat /etc/network/interfaces" command to show that those lines are not actually INSIDE the file.
Photo of Eric Pulvino

Eric Pulvino, Official Rep

  • 4,082 Points 4k badge 2x thumb
This is using the so called "unified diff" format. Here the behavior of diff is that it shows us a single piece of the text, in the line @@ -255,21 +255,21 @@ the part -255,21 relates to file1.txt and the part +255,21 to file2.txt. They tell us that diff will show a piece of text, which is 21 lines long starting from line number 255 in file1.txt. And the same about the file2.txt - diff shows us 21 lines starting from line 255.
Photo of Sharon Tubi

Sharon Tubi

  • 80 Points 75 badge 2x thumb
That's cool. Thanks!