How to run TCL script in Linux

  Generally, TCL script is an scripting language for controlling and extending software applications .A TCL file contains a TCL script, which is composed of TCL functions .Through this article you can get to know about the steps to run TCL script in Linux.

TCL script code in Linux

  Initially, execute the below sample TCL script code in the NS2 main TCL file,

The following code is for initialize the package configurations,

set val(chan)         Channel/WirelessChannel

set val(prop)         Propagation/TwoRayGround

set val(ant)            Antenna/OmniAntenna

set val(ll)              LL

set val(ifq)            Queue/DropTail/PriQueue

This below part of code is used for node configurations,

$ns at 0.1 “$node_(0) color magenta”

$ns at 0.1 “$node_(16) color magenta”

$ns at 0.1 “$node_(0) label \” Source \””

The following code is for node annotation,

$ns at 0.0001 “$ns trace-annotate \”      \””

$ns at 0.0001 “$ns trace-annotate \” Network Formation  \””

$ns at 0.0001 “$ns trace-annotate \”      \””

Run TCL script in Linux

     Execute the below commands to run TCL script in Linux,

cd /home/research/Desktop/Tcl_Script

sudo ./ns Script_Code.tcl

Run TCL script

At last, the result for run TCL script in Linux is depicted below,

Result of run TCL script in linux

If you have any queries based on the process to run the TCL script on linux , please contact us.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2