On Thu, Jul 12, 2012 at 12:21 AM, Eric in San Diego <eric.sc...@acm.org>wrote:
> In a shell, I can call > > > app arg1 arg2 arg3 arg4 arg5 arg6 arg7 > > and get my expected results. > > However, if I make what I think is the same call programmatically in > clojure: > > (ns ... > (:require [clojure.java.shell :as sh] > )) > > (defn test [] > (sh/sh "app" "arg1" "arg2" "arg3" "arg4" "arg5" arg6" "arg7")) > > my app is throwing an error. Is there some way to get at the difference > between the args as passed from the command-line and the args as passed > from the shell call? > > I would add that this approach has always worked in the past, not clear > why this particular app is the exception. > > Thanks for any help. Beware of the shell expansion! For example: In a terminal: ls *.clj will list all files ending with .clj. In the Clojure REPL: (sh "ls" "*.clj") will do something different: List all files named <star><dot>clj, as Clojure won't expand your wildcard but pass the "*.clj" as is. Denis > > > > -- > 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 > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en