linux如何写个可执行文件的循环执行脚本?
在linux里面,现在有一个可执行的文件,名字是aas,还有个文本文件是sps,现在想要这个功能:首先修改sps文件内容,把srfn行的01改成02,sfn行的001改成...
在linux里面,现在有一个可执行的文件,名字是aas,还有个文本文件是sps,现在想要这个功能:
首先修改sps文件内容,把srfn行的01改成02,sfn行的001改成002,保存;
执行aas文件(我不知道这个aas是什么语言写的,但是运行的时候不需要加./ ,只用在当前目录输入aas就可以运行了)。
再打开sps文件修改02为03,修改002为003,保存;
执行aas文件;
循环上面的步骤,直到18为止。
************以下是sps文件内容(不包含本行)****************************************
12345678901234567890123456789012345678901234567890dx=50%%%type=b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%srfn=ny-89-01-sr.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%sfn=001s.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%rfn=r_wt_all.r%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
************以上是文件内容(不包含本行)***********************************************
文件内容乱了,重新发一下:
12345678901234567890123456789012345678901234567890
dx=50%%%type=b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
srfn=ny-89-02-sr.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sfn=002s.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rfn=r_wt_all.r%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 展开
首先修改sps文件内容,把srfn行的01改成02,sfn行的001改成002,保存;
执行aas文件(我不知道这个aas是什么语言写的,但是运行的时候不需要加./ ,只用在当前目录输入aas就可以运行了)。
再打开sps文件修改02为03,修改002为003,保存;
执行aas文件;
循环上面的步骤,直到18为止。
************以下是sps文件内容(不包含本行)****************************************
12345678901234567890123456789012345678901234567890dx=50%%%type=b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%srfn=ny-89-01-sr.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%sfn=001s.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%rfn=r_wt_all.r%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
************以上是文件内容(不包含本行)***********************************************
文件内容乱了,重新发一下:
12345678901234567890123456789012345678901234567890
dx=50%%%type=b%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
srfn=ny-89-02-sr.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sfn=002s.prn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rfn=r_wt_all.r%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询