isaiah@titan:/tmp$ cat t3.jl
x = readline(STDIN)
println("input was: ", x)
isaiah@titan:/tmp$ echo "hello" | julia t3.jl
input was: helloOn Wed, Jan 14, 2015 at 5:19 AM, <[email protected]> wrote: > Hi, > > I have written different scripts in julia for which the input is so far a > file provided as an argument. The output is printed on stdout. > I would like to be able to use them with files as input or to pipe them in > unix shell so the output of a script is taken as input by the next script > in the pipe : > > script2 file > > or > > script1 file | script2 > > But so far I have not found how to handle that in the code in julia. > > So if someone knows how to that, his help would be highly appreciated. > > Thanks, > > Stephane >
