I have some parameters that the user can pass to the command, but I need to get the number following a specific string.
Here are some examples of the parameters.
xxx cpus="12" memory="1500mb"
xxx -cpus 12 -memory 1500mb
xxx cpus=12 memory=1500mb
I would like to search for the first occurrence of cpus and return the number 12.
The number could be any where from 1 to 1000.