perl -lwne "print $1 if /(\d+)\s+cpus:\s*$/" file.txt