From ed55675366966850aa9c1485738fa4232c7432a5 Mon Sep 17 00:00:00 2001 From: Christian Starkjohann Date: Sat, 3 May 2008 13:57:50 +0000 Subject: - output n/a if values are not in both files --- tests/compare-sizes.awk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/compare-sizes.awk b/tests/compare-sizes.awk index 80c7908..d294c54 100755 --- a/tests/compare-sizes.awk +++ b/tests/compare-sizes.awk @@ -36,6 +36,10 @@ END{ } for(i = 0; i < opt; i++){ option = options[i]; - printf("%39s %+6d %+5d\n", option, flash[file2, option] - flash[file1, option], ram[file2, option] - ram[file1, option]); + if(!flash[file2, option] || !flash[file1, option]){ + printf("%39s %6s %5s\n", option, "n/a", "n/a"); + }else{ + printf("%39s %+6d %+5d\n", option, flash[file2, option] - flash[file1, option], ram[file2, option] - ram[file1, option]); + } } } -- cgit v1.2.3