Friday, August 2, 2013

How To Execute tcl File In Ns2

How To Execute tcl File In ns2 For Linux

How to Run NS-2 Program in Linux


Creating the New File Name called first:

root@AMDI ns-allinone-2.28]# vi first.tcl

Note: Here vi  is Text Editor and Tcl is Script language for NS2

How To Execute tcl File In ns2 For Linux
After Opening text Editor Type a basic program I started a small program called My First Program in NS2

set ns [new Simulator]
$ns at 1 "puts \" My first program in NS2 \""
$ns at 1.5 "exit"

Press Esc and Press WQ and Finally run the program

$ns run

Execute the script using the ns command.

[root@AMDI ns-allinone-2.28]# ns first.tcl

How To Execute tcl File In ns2 For Linux


No comments:

Post a Comment

Linux Tips and tricks,Online Linux Helpers