[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to repeat trial?



On Thu, 18 Mar 1999, He Dan wrote:

> I want to do many trials of ex/simple.tcl.
> Write a shell or TCL script?

Well, you could just put the full path of the ns binary as the
first line of your OTcl script:

#!/vol/user/wonderfulme/ns-2/ns

chmod 755 the script, and then you can execute the script from the
commandline as 'script.tcl' instead of 'ns script.tcl'

That will allow you to write a script in something else executing it
as any unix program, as many times as you want.

cheers,

L.

> I write some lines as follows:
> 
> for {set i 0} {$i<10} {incr i}  {
> exec ns simple.tcl .. ..
> }
> 
> It is only once to be run.
> How i can do?
> 
> funny
> 
> Dan

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>