batch_test.sh

来自「基于NS-2的车辆Ad Hoc网络(VANET)的一个应用层协议框架」· Shell 代码 · 共 28 行

SH
28 行
字号
#!/bin/bash# This is only an example file to help you getting started with# shell-scripting. It does not work as it is, you have to adjust# it (and the prepare the tcl file for it)!OutputDir="/home/myuser/sim_data"para1_list="1 2 3"para2_list="10 20 30"for para2 in $para2_list;do    for para1 in $para1_list;    do        cmd="ns test_batch.tcl $para1 $para2 > $OutputDir/output-p1$para1-p2$para2.txt"        echo $cmd        eval $cmd                # If you run several simulations in a batch, it may be necessary        # to delete your tracefiles at the end of every simulation, to prevent        # you from running out of disk space. there is an example on how to        # do this in the vntest.tcl file.        # Also, do not forget to define the opt(outdir) in your tcl file        # in function of the parameters, else a new simulation overwrites        # the previous one :)            donedone

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?