I'm currently coding in Julia, and at some point, I have to run a .exe program at the Command Prompt. Let's name that program "x.exe". I decided to add the following line to my code for Julia to execute the program inside of the code:
run(pipeline('x.exe input.txt 5 500',stdout="output.txt"))
The code works perfectly, but I have to insert manually the values "5" and "500", which are respectively, the number of rows in the input.txt file and the number of items of each row in the input.txt file. They also are the number of rows and columns of an Array stored in Julia.
Is there a way for the code to read those numbers directly? I tried
writedlm("size.txt", transpose([size(Array)[1],size(Array)[2]])," ")
and then
run(pipeline('x.exe input.txt type size.txt',stdout="output.txt"))
but it don't work....