
[why] iozone can match the line like: 64 4 1599680 3057153 4274062 4897948 3588436 2892445 2772930 3057153 3958892 3057153 3022727 3363612 4564786 but cannot match the line as below(there are extra spaces after '2892445'): 64 4 1599680 3057153 4274062 4897948 3588436 2892445 [how] Add line.strip! before match Signed-off-by: Lu Kaiyi <2392863668@qq.com> --- stats/iozone | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stats/iozone b/stats/iozone index 9f7ee72f..32dce7ba 100755 --- a/stats/iozone +++ b/stats/iozone @@ -8,7 +8,8 @@ per_record = {} all_sum = 0 nr_records = 0 while (line = STDIN.gets) - next unless line =~ /^\s*\d+.*\d+$/ + line.strip! + next unless line =~ /^\d+.*\d+$/ data = line.split data.each_index do |i| -- 2.23.0