使用grep、sed正则提取字符串
grep
echo "number : 123456" | grep -oP '(?<=number : )(\d+)'
sed
echo "number : 123456" | sed 's/number : \([0-9]*\)/\1/g'
echo "number : 123456" | grep -oP '(?<=number : )(\d+)'
echo "number : 123456" | sed 's/number : \([0-9]*\)/\1/g'