Do you need to use cut ? cut intended to highlight only one character delimiter. I donβt think that cutting can be as simple as you expected.
sed is simple:
$ echo "Memory Limit: 12345 KB" | sed 's/.*:\s*//' 12345 KB
explanation:
.*:\s* matches all letters to the last colon, then after that matches all empty characters and deletes them, replacing the empty string.
it turns out that you were expecting one number. then I would say just go ahead and match the numbers:
$ echo "Memory Limit: 12345 KB" | grep -o -P '\d+' 12345
source share