FIND YOUR NEXT FEW LINES

Results for “Execution & file transfer”

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

848 snippets foundClear filters
RustFiles & paths

Write and read a UTF-8 file

Write and read a UTF-8 file in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellStructured formats & encodings

Write object records to a CSV file

PowerShell: Export-Csv uses property names as headers and quotes values when needed.

PowerShell✓ Tested
Bash ScriptsInput streams & redirection

Write several messages through one file descriptor

Bash Scripts: Open a destination once and close the descriptor after writing.

Bash Scripts✓ Tested
Linux CommandsGetting Started

Write text to a new practice file

Linux Commands: Write text to a new practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
PowerShellFiles & paths

Write UTF-8 text to a file

Save a string without adding an extra newline.

Set-Content✓ Tested
PowerShellCommands & execution context

Capture a command’s success-stream output

PowerShell: Assignment collects output values without requiring text redirection to a file.

PowerShell✓ Tested
PowerShellCommands & execution context

Check an external process exit status explicitly

PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.

PowerShell✓ Tested
PowerShellCommands & execution context

Check whether a command can be resolved

PowerShell: Get-Command with a local error override supports an expected missing-command lookup.

PowerShell✓ Tested
PowerShellCommands & execution context

Discard incidental output from a setup command

PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.

PowerShell✓ Tested
PowerShellCommands & execution context

Inspect a URI through typed properties

PowerShell: The Uri class separates URL components without manual string splitting.

PowerShell✓ Tested
PowerShellCommands & execution context

Pass an environment value to a child process

PowerShell: The process environment is inherited by a launched child PowerShell process.

PowerShell✓ Tested
PowerShellCommands & execution context

Read named fields from a successful regex match

PowerShell: The Matches table is updated after a successful scalar match operation.

PowerShell✓ Tested