比如x="84 // the number of people"怎么让x=84?
#! /bin/sh
x="84 // the number of people"
echo $x|grep -o '[0-9]\+'
#这是把其中数字提取出来的命令,当然现在是字符型的,如果你想赋值为整形的话加条命令就成
这是Linux 的 shell 语言是x="84 // ...."