Re: clojure.java.shell/sh and expand wildcard

2014-02-25 Thread John Gabriele
On Tuesday, January 21, 2014 11:05:13 PM UTC-5, Michael Gardner wrote:
>
> Try (sh “bash” “-c” “ls *.txt”). 
>
>
Sorry for the belated reply, Michael. Thanks so much for the help; works!

-- John
 

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: clojure.java.shell/sh and expand wildcard

2014-01-21 Thread Michael Gardner
Try (sh “bash” “-c” “ls *.txt”).

On Jan 21, 2014, at 21:51 , John Gabriele  wrote:

> I'd like to do something like:
> 
> user=> (require '[clojure.java.shell :as sh])
> user=> (sh/sh "ls" "*.txt")
> 
> but get:
> 
> {:exit 2, :out "", :err "ls: cannot access *.txt: No such file or 
> directory\n"}
> 
> even though there *are* a few .txt files present.
> 
> That error message is the same one I'd get if I tried:
> 
> $ ls '*.txt'  # or
> $ ls \*.txt
> 
> How can I get that sh/sh call to work with the wildcard? (Note: I realize I 
> can use Raynes' fs module for this particular example, but I want to be able 
> to pass wildcards to sh/sh in general.)
> 
> Thanks!
> 
> 
> -- 
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


clojure.java.shell/sh and expand wildcard

2014-01-21 Thread John Gabriele
I'd like to do something like:

user=> (require '[clojure.java.shell :as sh])
user=> (sh/sh "ls" "*.txt")

but get:

{:exit 2, :out "", :err "ls: cannot access *.txt: No such file or 
directory\n"}

even though there *are* a few .txt files present.

That error message is the same one I'd get if I tried:

$ ls '*.txt'  # or
$ ls \*.txt

How can I get that sh/sh call to work with the wildcard? (Note: I realize I 
can use Raynes' fs module for this particular example, but I want to be 
able to pass wildcards to sh/sh in general.)

Thanks!

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.