This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-21
Channels
- # babashka (16)
- # beginners (182)
- # calva (13)
- # chlorine-clover (43)
- # clj-kondo (17)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (97)
- # clojure-argentina (7)
- # clojure-dev (45)
- # clojure-europe (7)
- # clojure-germany (5)
- # clojure-nl (4)
- # clojure-portugal (4)
- # clojure-romania (5)
- # clojure-spec (46)
- # clojure-uk (21)
- # clojuredesign-podcast (2)
- # clojurescript (159)
- # conjure (28)
- # core-async (7)
- # cursive (13)
- # datomic (17)
- # defnpodcast (9)
- # duct (1)
- # fulcro (45)
- # graphql (6)
- # jobs (7)
- # jobs-discuss (1)
- # juxt (3)
- # kaocha (4)
- # leiningen (12)
- # malli (5)
- # observability (1)
- # off-topic (50)
- # pathom (15)
- # re-frame (16)
- # reitit (5)
- # remote-jobs (21)
- # ring (7)
- # shadow-cljs (166)
- # test-check (6)
- # tools-deps (27)
- # xtdb (2)
Hi. What's the best way to execute a bash command in a bb script? eg smth like
(let [buck $(aws s3 ls)] println buck)
@dennisa something like this: (require '[clojure.java.shell :refer [sh]]) (let [buck (-> (sh "aws "s3" "ls") :out)] (println buck))
Fixed a bug in bb which now makes it compatible with clojure.math.combinatorics
:
https://github.com/borkdude/babashka/releases/tag/v0.0.88-2
https://github.com/borkdude/babashka#clojuremathcombinatorics
if you specify options after --nrepl-server
with no args, for instance --nrepl-server --classpath .
the option after is interpreted as an arg to --nrepl-server
@hybas3 Ah, that's a bug. Feel free to post an issue. For now just give it a port number 1667
Thanks! is there a way to it with bb command ? I am missing smth
bb "(require '[clojure.java.shell :refer [sh]]) (let [buck (-> (sh "aws" "s3" "ls") :out)] (println buck))"
clojure.lang.ExceptionInfo: Could not resolve symbol: aws [at line 1, column 64]
@dennisa You are passing a string, but you're also using strings inside that string. You need to escape the inner double quotes.
@dennisa you can do echo bb "(require '[clojure.java.shell :refer [sh]]) (let [buck (-> (sh "aws" "s3" "ls") :out)] (println buck))"
to see what bb actualy running