【发布时间】:2011-11-08 15:43:34
【问题描述】:
我正在用 tcl 编程(用于 modules 命令)。我需要找出用户正在使用什么外壳。由于我以前从未在 tcl 中编程过,所以我不知道我的简单代码有什么问题。有人可以请教吗?
set shell [module-info shell]
if { $shell=="bash" } {
puts "running bash"
}
我得到的错误(对不起,我最初没有包括它)是:
intel64(32):ERROR:102: Tcl command execution failed: if { $shell == "bash" } {
puts "running bash
}
请注意,intel64 是找到此代码的文件,第 34 行是最后一行。
【问题讨论】:
-
你能给我们输出
$shell变量(puts $shell)的输出吗?module-info shell输出 (puts [module-info shell])?
标签: tcl