FIND YOUR NEXT FEW LINES

Results for “work”

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

537 snippets foundClear filters
Bash ScriptsInput streams & redirection

Read null-delimited filenames into an array

Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Read part of a shell string

Bash Scripts: Read part of a shell string with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Read positional parameters in a function

Bash Scripts: Read positional parameters in a function with a small standalone Bash program.

Bash Scripts✓ Tested
GoJSON & encoding

Read quoted CSV fields

Read quoted CSV fields using a complete Go program with explicit sample inputs.

Go✓ Tested
GoGetting Started

Read slice indices and values

Read slice indices and values using a complete Go program with explicit sample inputs.

Go✓ Tested
GoFiles & paths

Read text line by line

Read text line by line using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsGetting Started

Read the first array element

Bash Scripts: Read the first array element with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Read the length of an ASCII string

Bash Scripts: Read the length of an ASCII string with a small standalone Bash program.

Bash Scripts✓ Tested
RustIterators & transformations

Read values until a condition changes

Read values until a condition changes in a complete Rust program using the standard library.

Rust✓ Tested
GoConcurrency & cancellation

Receive a result from a goroutine

Receive a result from a goroutine using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsInput streams & redirection

Redirect an entire group of commands

Bash Scripts: Brace grouping runs in the current shell and shares a single output redirection.

Bash Scripts✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Refuse to overwrite an existing file with redirection

Bash Scripts: Noclobber makes a plain greater-than redirection fail when the target already exists.

Bash Scripts✓ Tested