← 返回命令列表

Linux command

bb 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Build

bb [script.clj]

Run

bb repl

Execute

bb -e ["(println (+ 1 2 3))"]

Install

bb tasks

说明

bb (Babashka) is a native Clojure interpreter for scripting. It provides fast startup times and can run Clojure scripts without JVM overhead, making it suitable for shell scripting and task automation. The tool enables using Clojure for tasks typically handled by bash or Python scripts.

参数

-e, --eval _expr_
Evaluate expression
-f, --file _file_
Run file
-m, --main _ns_
Call main function in namespace
--repl
Start REPL
--nrepl-server
Start nREPL server
--classpath _cp_
Set classpath
--uberscript _file_
Create standalone script

FAQ

What is the bb command used for?

bb (Babashka) is a native Clojure interpreter for scripting. It provides fast startup times and can run Clojure scripts without JVM overhead, making it suitable for shell scripting and task automation. The tool enables using Clojure for tasks typically handled by bash or Python scripts.

How do I run a basic bb example?

Run `bb [script.clj]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e, --eval _expr_ do in bb?

Evaluate expression