Use the single equal sign to assign a value to a variable, unlike the double equal sign (==), as in the previous condition, which compare the values.
使用单等于号来向变量赋值,而不是像在前一个条件中那样使用双等于号 (==) 来比较值。
The phrase \$somevar escapes the dollar sign, avoiding interpretation of the variable in the command where the prompt is set. Instead, the interpretation occurs whenever the prompt is drawn.
$somevar 可以对美元符号进行转义,避免在设置提示符的命令中对该变量进行解释,而是在显示提示符时对其进行解释。
- And here as promised is that other operator -- looks a little weird, but because assignment is already using the equal sign to assign one value on the right to a variable on the left.
在这里正像所承诺的那样,其他的操作-,看起来有点怪异,但是因为“=“已经被用来当赋值运算符了,用来把右边的一个值赋值给左边的变量。
应用推荐