awk command to run a C++ code and input several times -


Say, I have a code, which I compile:
  $ gcc code  

/ pre>

Now if I need to run this code 200 times for example and the name of input files is: 0c.txt, 1c .txt, ....., 199c.txt etc and I want to use the same value every time the mass (like mass = 6), how do I write an "awk" command for this? thanks for your help.

You do not specify your outputfile name I think 0cout, 1c.out, ... < / P>

I also believe that the F.outout program largely reads extensively with stdin instead.

  #! / Usr / bin / gawk -f BEGIN {mass = 6 for (i = 0; i & lt; 200; i ++) {cmd = sprintf (". / F.out% dc.txt% dc.out", I, i) print mass. & Amp; (CMD)}}  with the output of each line from the shutdown (CMD, "to") ((CMD and exit)> gt;) {/ ef.out} Pre> 

ref

You want to write in:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -