FIND YOUR NEXT FEW LINES

Results for “directory”

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

667 snippets foundClear filters
Bash ScriptsParameter expansion

Assign a default to an empty or unset variable

Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.

Bash Scripts✓ Tested
SQLiteSubqueries & ranked selection

Attach an overall count to every row

SQLite: An uncorrelated scalar subquery supplies the same aggregate to each output row.

SQLite✓ Tested
GoFunctions & types

Attach behavior to a struct

Attach behavior to a struct using a complete Go program with explicit sample inputs.

Go✓ Tested
RustGetting Started

Bind a value with let

Bind a value with let in a complete Rust program using the standard library.

Rust✓ Tested
SQLiteConstraints & defaults

Block deletion of a referenced parent

SQLite: The default foreign-key action prevents deletion while a child still refers to the parent.

SQLite✓ Tested
RustThreads & shared ownership

Borrow local data in a scoped thread

Borrow local data in a scoped thread in a complete Rust program using the standard library.

Rust✓ Tested
RustTesting & reusable patterns

Borrow text until a modification is needed

Borrow text until a modification is needed in a complete Rust program using the standard library.

Rust✓ Tested
RustGetting Started

Borrow text without transferring ownership

Borrow text without transferring ownership in a complete Rust program using the standard library.

Rust✓ Tested
Linux CommandsDates & process utilities

Bound a command execution time

Linux Commands: Use timeout and handle status 124 as an expected time limit.

Linux Commands✓ Tested
Linux CommandsGetting Started

Branch on a command’s exit status

Linux Commands: Branch on a command’s exit status using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Linux CommandsSearching text

Branch on whether a pattern exists

Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.

Linux Commands✓ Tested
SQLiteJSON data

Build a JSON array from rows

Aggregate ordered text values into JSON.

json_group_array✓ Tested