FIND YOUR NEXT FEW LINES

Results for “PATH”

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

233 snippets foundClear filters
PowerShellDates & numeric validation

Reject NaN and infinite values

PowerShell: Double.IsFinite excludes numeric values unsuitable for ordinary bounded calculations.

PowerShell✓ Tested
Bash ScriptsVariables & text

Remove a filename extension

Keep the path while removing its final extension.

filename✓ Tested
PowerShellHashtables & object records

Remove an optional hashtable entry

PowerShell: Remove changes the map in place without changing unrelated entries.

PowerShell✓ Tested
GitRestoring & revising local work

Remove only a named untracked scratch file

Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.

Git✓ Tested
PowerShellFile operations & integrity

Rename a file in its current directory

PowerShell: Rename-Item changes the name without moving the item to another directory.

PowerShell✓ Tested
PythonFile operations & archives

Rename a file within a directory

Python: Use Path.rename and inspect the resulting path.

Python✓ Tested
PowerShellGetting Started

Repeat while a condition holds

PowerShell: Repeat while a condition holds using PowerShell 7.

PowerShell✓ Tested
PowerShellGetting Started

Replace a literal word in text

PowerShell: Replace a literal word in text using PowerShell 7.

PowerShell✓ Tested
PostgresJSON & arrays

Replace a nested JSONB value

Change one path with jsonb_set.

jsonb_set✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
C#Asynchronous work & URI handling

Resolve a relative URI against a base

C#: Use a base URI ending in a slash when the final path component represents a directory.

C#✓ Tested
JavaScriptRegular expressions & URL encoding

Resolve a relative URL against a base

JavaScript: A trailing slash makes the final base path component a directory.

JavaScript✓ Tested