How to create, edit, and run *.tcl files under Linux Ubuntu
(2011-01-11-20:58:00)
1. Create
For example, to create a *.tcl file, simply enter it in the terminal
Touch *.TCL can
Note: When creating a. tcl file, it must be created under a common user and not created under root, otherwise permissions issues can be cumbersome. Then, to open the file for editing gedit Hellow.tcl can be edited///cat hellow.tcl Its role is to display the contents of the command line, rather than at the editing terminal. After save, direct./HELLOW.TCL is ready to run. Some of these locations may involve modifying permissions, directly chmod 777 directory to
2. Compile
*.TCL files can be compiled with different compilers
1> VI *.TCL
2> Vim *.TCL
3> gedit *.TCL
3. Run
I ran *.tcl files with ns2.
So the Run-time input is
NS *.TCL
Wrong # Args:no script following "then" argument
In the If Else statement, the format is a bug-less problem that restricts the comparison to death.
If {$x <0} then {//Here's {must be in the same line as if ...
Puts "The Inputnumber $x less than 0"
}
Extra characters after Close-brace
}else {//Here is an error because there is no space between the else and the previous}, causing the recognition not else
Puts "The Inputnumber $x ..."