Arc Forumnew | comments | leaders | submitlogin
4 points by akkartik 395 days ago | link | parent

You're almost there. To pass in to Arc a filename argument to write to, you'd say this:

  $ cat test.arc
  (tofile (argv 1)
    (prn "hello, world!"))
(The quit is unnecessary since Arc will automatically quit after running all commands in batch mode.)

  $ ./arc.sh test.arc test.out
  $ cat test.out
  hello, world!
argv is a list containing commandline arguments, and tofile redirects prn to some given filename.