bb
Native Clojure interpreter for scripting. More information: https://book.babashka.org/#usage.
-
[e]valuate an expression:
bb -e "(+ 1 2 3)"
-
Evaluate a script [f]ile:
bb -f {{path/to/script.clj}}
-
Bind input to a sequence of lines from
stdin
:
printf "first\nsecond" | bb -i "(map clojure.string/capitalize *input*)"
-
Bind input to a sequence of EDN(Extensible Data Notation) values from
stdin
:
echo "{:key 'val}" | bb -I "(:key (first *input*))"
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.