# Perl, not sh.
while (<>) {
      chop;
      if (/number of screens:[ \t]*([0-9]*)/) {
            print $1, "\n";
      }
}
