Results for “before”
Small, practical examples. Search by task or narrow things down below.
Prepend items while preserving existing array values
Bash Scripts: Construct a new array with the new values before the quoted original expansion.
Bash Scripts✓ Tested
Preserve a failure status while an EXIT trap runs
Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.
Bash Scripts✓ Tested
Read a file from the parent commit
Git: HEAD~1 names the first parent one generation before HEAD.
Git✓ Tested
Read bytes from a chosen file offset
C: Check fseek before reading so an unsupported or invalid seek is not ignored.
C✓ Tested
Read rows from CSV text
Parse CSV into objects with named properties.
CSV✓ Tested
Reject a missing required configuration value
Bash Scripts: Check a required value explicitly and emit a controlled diagnostic before exiting.
Bash Scripts✓ Tested
Reject NaN and infinite numeric inputs
Python: Use isfinite before computations that require an ordinary finite float.
Python✓ Tested
Remove duplicate values while keeping the smallest key
SQL: Identify retained keys in a grouped subquery before deleting other copies.
SQL✓ Tested
Remove duplicate values while keeping the smallest key
SQL Server: Identify retained keys in a grouped subquery before deleting other copies.
SQL Server✓ Tested
Remove duplicate values while keeping the smallest key
Postgres: Identify retained keys in a grouped subquery before deleting other copies.
Postgres✓ Tested
Remove duplicate values while keeping the smallest key
SQLite: Identify retained keys in a grouped subquery before deleting other copies.
SQLite✓ Tested
Replace a text file with an atomic rename
Prepare new content beside the target before renaming it into place.
atomic write✓ Tested