I execute the command diffin perl.
my @lines = `/usr/local/bin/diff -udr \"$expected_file\" \"$gen_file\"`;
if ($? != 0)
{
print ERRFILE "Diff between $expected_file and $gen_file failed\n";
return $diff_err;
}
There diffmight be a crash for some reason. For example: stderr showed that / usr / local / bin / diff: test.txt: There is no such file or directory. I want to read this message in the program. How can I find the message stderr command diff(or grepor any command that I execute)?
Appreciate the help in advance.
Thanks Matthew Liju
source
share