FIND YOUR NEXT FEW LINES

Results for “aria”

Small, practical examples. Search by task or narrow things down below.

100 snippets foundClear filters
Bash ScriptsFunction scope & composition

Isolate variable changes in a subshell

Bash Scripts: Parentheses create a subshell whose variable assignments do not change the parent.

Bash Scripts✓ Tested
Bash ScriptsFunction scope & composition

Keep a function variable local

Bash Scripts: Local prevents an ordinary function assignment from replacing a caller variable.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Limit a beginner function variable to local scope

Bash Scripts: Limit a beginner function variable to local scope with a small standalone Bash program.

Bash Scripts✓ Tested
Docker / ComposeExecution & file transfer

Load environment variables from a file

Docker / Compose: An env file supplies one KEY=value assignment per line.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Load service variables from an env file

Docker / Compose: env_file supplies runtime environment values.

Docker / Compose✓ Tested
RustGetting Started

Match enum variants

Match enum variants in a complete Rust program using the standard library.

Rust✓ Tested
JavaRecords & reliable control flow

Narrow an object with a pattern variable

Java: Pattern matching avoids a separate cast after a successful instanceof check.

Java✓ Tested
Linux CommandsDates & process utilities

Pass a variable to one command

Linux Commands: Use env to supply a child process value without setting it permanently in the parent shell.

Linux Commands✓ Tested
Bash ScriptsInput streams & redirection

Pass a variable to standard input

Bash Scripts: A here-string supplies the expanded value followed by a newline.

Bash Scripts✓ Tested
Docker / ComposeContainer commands

Pass an environment variable

Supply configuration without changing an image.

environment✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Prevent a variable value from expanding as a filename pattern

Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.

Bash Scripts✓ Tested
Bash ScriptsParameter expansion

Read a variable whose name is stored in another variable

Bash Scripts: Indirect expansion performs one extra variable-name lookup.

Bash Scripts✓ Tested