📄 compare
字号:
#!/usr/bin/perl# Compares files with diff, ignoring additions or subtractions of blank lines#die("compare <file1> <file2>") unless ($#ARGV == 1); my $temp = ".tmp"; my $filter = "/home/djs/src/omni/cvs/src/omniidl/python/be/cxx/tools/filter";my $a = $ARGV[0];my $b = $ARGV[1];# Preprocess input files by running an external filtersystem("cat $a | $filter > $a$temp");system("cat $b | $filter > $b$temp");@changes = `diff --ignore-all-space --ignore-space-change --ignore-blank-lines $a$temp $b$temp`;while (@changes){ $line = shift @changes; if ($line =~ /^(>|<)\s*\S+\s*/){ print "Lots of differences!"; exit(1); }}exit(0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -