Extract SPEC scan data

#!/usr/bin/perl
# K.Tamasaku 8/20/2020
# log.txt : SPEC output file (change filename in accordance with situation)
# Note that "perl -00 -ne 'print if /S 51 /' log.txt" extracts Scan #51 from log.txt.

for($i=$ARGV[0]; $i<=$ARGV[1]; $i++) {
   system("perl -00 -ne 'print if /S $i /' log.txt > scan$i.dat");
}

BACK