FIND YOUR NEXT FEW LINES

Results for “Restoring & revising local work”

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

812 snippets foundClear filters
Bash ScriptsInput streams & redirection

Read complete lines into an array

Bash Scripts: Mapfile with -t removes each line terminator but preserves other whitespace.

Bash Scripts✓ Tested
JavaScriptUTC date operations

Read date components in UTC

JavaScript: UTC accessors avoid differences caused by the machine’s local timezone.

JavaScript✓ Tested
TypeScriptUTC date operations

Read date components in UTC

TypeScript: UTC accessors avoid differences caused by the machine’s local timezone.

TypeScript✓ Tested
Bash ScriptsText parsing & arithmetic

Read fields captured by a Bash regular expression

Bash Scripts: BASH_REMATCH contains the full match followed by capture groups after a successful regex test.

Bash Scripts✓ Tested
RustFiles & paths

Read file metadata without reading its contents

Read file metadata without reading its contents in a complete Rust program using the standard library.

Rust✓ Tested
Bash ScriptsInput streams & redirection

Read from a dedicated file descriptor

Bash Scripts: An explicitly opened descriptor keeps the script’s ordinary standard input available.

Bash Scripts✓ Tested
GoFiles & paths

Read from an in-memory filesystem

Read from an in-memory filesystem using a complete Go program with explicit sample inputs.

Go✓ Tested
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
Docker / ComposeContainer commands

Read output from a completed container

Retrieve the stdout captured by Docker.

logs✓ 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