mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-18 02:49:45 +00:00
Update cheatsheets
This commit is contained in:
26
bb
Normal file
26
bb
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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 [i]nput to a sequence of lines from `stdin`:
|
||||
|
||||
`printf "first
|
||||
second" | bb -i "(map clojure.string/capitalize *input*)"`
|
||||
|
||||
- Bind [I]nput to a sequence of EDN (Extensible Data Notation) values from `stdin`:
|
||||
|
||||
`echo "{:key 'val}" | bb -I "(:key (first *input*))"`
|
||||
Reference in New Issue
Block a user