On Nov 20, 10:49 pm, "Tom Emerson" <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 20, 2008 at 12:37 PM, Parth Malwankar
>
> <[EMAIL PROTECTED]> wrote:
> > I have a single line file (tmp.clj) where I am trying to
> > print *command-line-args*.
> > And I get an exception if I run it. I am not sure what I
> > am doing wrong here.
>
> I suspect the issue is in your 'clj' script: the command-line
> arguments follow two dashes ("--"): anything before that (and after
> your initial script name) constitute files that Clojure will attempt
> to load in addition to the first: this allows you to load multiple
> .clj files on the command-line. My variant of 'clj' looks like (with
> classpath noise removed):
>
> java clojure.lang.Script "$1" -- "$@"
Yes. That did the trick. Thanks very much.
I had blindly copied the clj script from the wiki.
Parth
>
> $ clojure tmp.clj foo bar baz
> ("tmp.clj" "foo" "bar" "baz")
>
> Hope this helps.
>
> --
> Tom Emerson
> [EMAIL PROTECTED]://www.dreamersrealm.net/~tree
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---