Hi t-rex
While there’s not much more value to be added beyond Athanasius’ response; (assuming your data resides in "file.txt") here's the obligatory one-liner:
perl -lwne "print $1 if /(\d+)\s+cpus:\s*$/" file.txt
Best of luck
Shadowsong
In reply to Re: extracting value in a string after checking value after colon ':'
by shadowsong
in thread extracting value in a string after checking value after colon ':'
by t-rex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |