FIND YOUR NEXT FEW LINES

Results for “Linux Commands”

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

266 snippets foundClear filters
PowerShellCollections & objects

Count items by group

Group repeated values and report each count.

Group-Object✓ Tested
PowerShellFiles & paths

Create a directory if needed

Ensure a directory exists before writing output.

New-Item✓ Tested
PowerShellGetting Started

Create a portable relative path

PowerShell: Create a portable relative path using PowerShell 7.

PowerShell✓ Tested
PowerShellGetting Started

Create an array of text values

PowerShell: Create an array of text values using PowerShell 7.

PowerShell✓ Tested
PowerShellGetting Started

Create an object with named properties

PowerShell: Create an object with named properties using PowerShell 7.

PowerShell✓ Tested
PowerShellGetting Started

Define a function with a parameter

PowerShell: Define a function with a parameter using PowerShell 7.

PowerShell✓ Tested
PowerShellFunctions & control

Define a function with a typed parameter

Accept a name and return a greeting.

function✓ Tested
PowerShellFile operations & integrity

Delete only a named scratch file

PowerShell: Use LiteralPath and avoid recursive removal for a single known file.

PowerShell✓ Tested
Arduino / CSerial protocols

Dispatch a one-character serial command

Arduino / C: A switch provides explicit handling for accepted and unknown commands.

Arduino / C✓ Tested
PowerShellFunctions & parameter validation

Dispatch values with wildcard patterns

PowerShell: Switch -Wildcard interprets shell-style matching patterns for each clause.

PowerShell✓ Tested
PowerShellFile operations & integrity

Distinguish a file from a directory

PowerShell: Test-Path can constrain the kind of item that is accepted.

PowerShell✓ Tested
Docker / ComposeCompose service options

Drop capabilities for a Compose service

Docker / Compose: cap_drop ALL removes optional Linux capabilities.

Docker / Compose✓ Tested