FIND YOUR NEXT FEW LINES

Results for “sed”

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

97 snippets foundClear filters
C++Getting Started

Explain a calculation with a comment

C++: Keep the code executable while documenting why a fixed input is used.

C++✓ Tested
CGetting Started

Explain a calculation with a comment

C: Keep the code executable while documenting why a fixed input is used.

C✓ Tested
PowerShellStrings & literal text

Extract a known substring

PowerShell: Substring uses a zero-based starting index and a character count.

PowerShell✓ Tested
SQLiteQueries & text

Extract part of a string

Use one-based positions with substr.

substr✓ Tested
jQueryCollections & styling

Find an element’s position among siblings

jQuery: index without arguments reports a zero-based sibling position.

jQuery✓ Tested
Bash ScriptsFunctions & arguments

Handle an expected command failure

Branch on a command’s exit code without aborting the script.

exit status✓ Tested
SQLBulk changes & set operations

Insert only keys absent from a destination

SQL: NOT EXISTS supports a set-based missing-row insert in a single-writer example.

SQL✓ Tested
SQL ServerBulk changes & set operations

Insert only keys absent from a destination

SQL Server: NOT EXISTS supports a set-based missing-row insert in a single-writer example.

SQL Server✓ Tested
PostgresBulk changes & set operations

Insert only keys absent from a destination

Postgres: NOT EXISTS supports a set-based missing-row insert in a single-writer example.

Postgres✓ Tested
SQLiteBulk changes & set operations

Insert only keys absent from a destination

SQLite: NOT EXISTS supports a set-based missing-row insert in a single-writer example.

SQLite✓ Tested
PostgresRows & writes

Insert or update on a key conflict

Use a unique key to update an existing row.

ON CONFLICT✓ Tested
Bash ScriptsArray operations

Join array items with a one-character separator

Bash Scripts: A local IFS controls the separator used by the quoted star expansion.

Bash Scripts✓ Tested