For diff command, an exit status of 0 means no differences were found, 1 means some differences were found.
What are the error exit values for diff?
It works as expected with diff command.
However, when I try the same with vimdiff command, it doesn't work.
vimdiff -c "set foldlevel=9999" file1.log file2.log -c TOhtml -c 'w! 'vimdiff.html'' -c 'qa!'
Even though file1 and file2 are different here, echo $?
returns 0.
For diff, it returns 1 successfully as the files are different.
Is there a way I can do the same for vimdiff? How can I know whether the files were same or different for the above vimdiff command?