Murrmel5
Murrmel5

Reputation: 107

How to input file to julia script in command line

Say that I have script.jl and file.txt. At the moment I read the file within the script. (with the path hard coded)

What I would like to do is to type:

julia script.jl /path/to/file.txt

in the command line (linux), and then handle the file in the script. How to do this?

Thanks in advance! Mathias

Upvotes: 2

Views: 253

Answers (1)

Murrmel5
Murrmel5

Reputation: 107

Found the answer. The array ARGS holds the command line arguments :)

Upvotes: 3

Related Questions