batchsimos
来自「一个用在mips体系结构中的操作系统」· 代码 · 共 31 行
TXT
31 行
#!/usr/local/bin/perl5 -w## Copyright (C) 1996-1998 by the Board of Trustees# of Leland Stanford Junior University.# # This file is part of the SimOS distribution. # See LICENSE file for terms of the license. #$firstrun = shift(@ARGV) || die "usage: batchSimos firstrun lastrun dir command";$lastrun = shift(@ARGV) || die "usage: batchSimos firstrun lastrun dir command";$dir = shift(@ARGV) || die "usage: batchSimos firstrun lastrun dir command";$simos = "@ARGV";foreach $run ($firstrun..$lastrun) { ($sec,$min,$hour,$mday,$mon) = localtime(time); printf "%02d/%02d %02d:%02d:%02d ", $mon, $mday, $hour, $min, $sec; print "starting simos[$run]: $simos\n"; $runname = sprintf("%03d", $run); system "$simos -o runnum $run 1> $dir/run.$runname.out 2>&1 < /dev/null"; rename("cpu.log", "$dir/cpu.log.$runname");}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?