b
babelfish
Cheat Sheet Published: 8/2/2026

Operators

Zaphod Beebelbrox by Zaphod Beebelbrox
Operator Type Description Example
++ List Concatenates two lists [1, 2] ++ [3, 4][1, 2, 3, 4]
// Attribute Set Merges two attribute sets { a = 1; } // { b = 2; }{ a = 1; b = 2; }
+ Number Adds two numbers 5 + 38
* Number Multiplies two numbers 6 * 212
== Generic Equality check foo == bartrue if foo equals bar
!= Generic Inequality check foo != bartrue if foo is not bar
&& Boolean Logical AND true && falsefalse
` ` Boolean
! Boolean Logical NOT !truefalse
? Attribute Set Checks if a key exists foo ? bartrue if bar exists in foo
or Generic Default if the first is null config.myOption or "default"
//= Attribute Set Merges, with LHS assigning RHS { a = { }; } //= { b = 2; }{ a.b = 2; }
Tags: #Linux

Subscribe

Get new posts in your inbox. You'll receive a confirmation email before anything else.