0

以下代码不起作用:

case $operatingsystemmajrelease  {
  '6': { $TOUCH = "/bin/touch"}
  '7': { $TOUCH = "/usr/bin/touch"}
}

我也试过:

case $operatingsystemmajrelease {
"6": { $TOUCH='/bin/touch' }
"7": { $TOUCH='/usr/bin/touch' }
default: { fail('Operatingsystemmajrelease case default triggered.')}
}

我基本上是在尝试根据 CentOS 主要版本为变量赋值。

4

0 回答 0