How do I save the output to .txt file?

Have a look at the documentation, which you can also access from the REPL by typing ? open and ? do.
If you still have questions after reading the documentation feel free to ask.

Depending on what exactly it is that you do, I don’t think the optimal solution is to print the arrays into a text file like this. Maybe you can organize all your data in a dataframe which you can then more easily manipulate and save/load from file.

You could also use a package like JLD2 which allows you to save and load Julia objects in a format similar to HDF5.

3 Likes