Welcome to LQ.
May be read some documentation in "the other thread"
> > post # 2
Using ' ns ' for a start : ' ns "example".tcl '.
Some files will then open the " nam console ".
.. and may be require you to hit the play button ( > ).
Some other will create a file ' nam.out ' only,
.. to be run with ' nam nam.out '.
The basic examples : see post # 4 , in "the other thread"
( they are from the ns / nam tutorial ).
And you have 468 files.tcl in ns-allinone-2.34/ns-2.34/tcl/
.. also to be used with ' ns <file>.tcl '.
Also please use the LQ Search :
"Main Menu" > Search → Tag Name = ns2
P.S. : @ TB0ne : NS-3 is a very different beast, not an ns2 update.