Path Tcl and Bash

2019-09-18 05:45发布

问题:

i have a problem with path in a tcl file i tried to use

source  " /tmp/mob.tcl " 

and this path in bash file :

/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          

but terminal give me this error :

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

someone can help me please

回答1:

Learn to believe the error messages you get ;-).

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

This is because you have submitted a string with the first letter (and the last) of the path being a " " char, i.e.

            source  " /tmp/mob.tcl " 

try submitting

            source  "/tmp/mob.tcl" 

IHTH



标签: bash tcl ns2 otcl