From 724ed194a3c78a480f8fe8d132ae113690b3a11e Mon Sep 17 00:00:00 2001 From: Nicholas <3789764+skykanin@users.noreply.github.com> Date: Fri, 18 Nov 2022 02:52:38 +0100 Subject: [PATCH] bb: add page (#9500) --- pages/common/bb.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/bb.md diff --git a/pages/common/bb.md b/pages/common/bb.md new file mode 100644 index 0000000000..70503326ab --- /dev/null +++ b/pages/common/bb.md @@ -0,0 +1,20 @@ +# bb + +> Native Clojure interpreter for scripting. +> More information: . + +- [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*))"`