# Passing arguments into package from a command line

I am interested in running the same experiment with the different initial state. So, I am looking for a way to passing arguments into a plain text .m file from the command line.

• Have you seen the tutorial on Wolfram Language Scripts? And have you seen the documentation for $CommandLine and $ScriptCommandLine? – C. E. Jul 14 at 20:17
• @C.E. Thank you. I am using a cluster (Sun Grid Engine), and the format of the WL file that may run on it is ".m". I have seen this tutorial, but I think that the way to pass arguments to script and package is not similar, I am wrong? – Kiril Danilchenko Jul 14 at 20:26
• I wouldn't mix the command line interface and the package, I would put a script file next to the package that loads the package and looks at the command line arguments to do what needs to be done. This script can have the ending .m, it won't matter. – C. E. Jul 15 at 7:17
• @C.E. thank you. I will try this approach. – Kiril Danilchenko Jul 15 at 17:45