【问题标题】:Path Tcl and Bash路径 Tcl 和 Bash
【发布时间】:2014-08-30 20:16:41
【问题描述】:

我尝试使用的 tcl 文件中的路径有问题

source  " /tmp/mob.tcl " 

和 bash 文件中的这个路径:

/opt/ns-allinone-2.35/ns-2.35/indep-utils/cmu-scen-gen/setdest/setdest -v 1 -n $n -p 10 -M 64 -t 100 -x 250 -y 250 >> /tmp/mob.tcl          

但是终端给我这个错误:

couldn't read file " /tmp/mob.tcl ": no such file or directory
    while executing
"source.orig { /tmp/mob.tcl }"

有人可以帮帮我

【问题讨论】:

    标签: bash tcl ns2 otcl


    【解决方案1】:

    学会相信你收到的错误信息 ;-)。

    couldn't read file " /tmp/mob.tcl ": no such file or directory
    

    这是因为您提交了一个字符串,其中路径的第一个字母(和最后一个)是“”字符,即

                source  " /tmp/mob.tcl " 
    

    尝试提交

                source  "/tmp/mob.tcl" 
    

    IHTH

    【讨论】:

    • 我又试了一次,但它给了我这个:can't read "node_(0)": no such variable while execution "$node_(0) set X_ 232.673397845604" (file "/tmp/mob .tcl” 第 4 行)从“source.orig /tmp/mob.tcl”(“uplevel”正文第 1 行)中调用 从“uplevel source.orig [list $fileName]”中调用 从“if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig [list $fileName] ..." (procedure "source" line 8) 从 "source"/tmp 中调用/mob.tcl" "
    • @user3821478 不要编辑此问题以添加新的、不相关的错误消息。 提出一个新问题。我们不会用完 ID...
    • @DonalFellows,是的,你是对的。在 user3821478 ,当您为此创建新问题时,请粘贴错误消息。使用编辑框左上角的{} 工具在错误消息的突出显示文本上保持格式。请不要使用bash 标签发帖。使用tcl 标签帮助具有tcl 经验的用户关注您的问题。祝你好运!
    猜你喜欢
    • 2014-09-01
    • 2012-09-15
    • 2017-05-27
    • 1970-01-01
    • 2014-09-18
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    相关资源
    最近更新 更多