Welcome to LQ. .. ..
..
The tcl scripts can have location anywhere in /home/alin/ ...
E.g. /home/alin/ns2/examples/
The commands are then to be 1) cd /home/alin/ns2/examples/
2) ns example1.tcl
Your used location, /home/alin/ns-allinone-2.34/bin/
is not unusable, but example1.tcl is not a binary,
so I wouldn't recommend it.
Anyway : Please always change directory to the used location.
Or use the full path : 'ns /home/alin/ns2/examples/example1.tcl'
..
Other info :
LQ Search , Tag or Keyword = ns2
..