我有一个命令行程序,可以打印出报告,例如:
I found 0 problems on your database,
0 problems were found on your database
等等。
我想编写一个仅将数字导出到变量的 linux shell 脚本。我找不到这样做的正确方法。我怀疑我没有grep
正确使用(或者有更好的命令);IE
I found 43 problems on your database,
43 problems were found on your database
$VAR=43
请指教