Results for “Select-Object”
Small, practical examples. Search by task or narrow things down below.
Distinguish an own property from an inherited one
TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.
TypeScript✓ Tested
Enumerate hashtable entries in a stable order
PowerShell: Sort entries by key when predictable output matters.
PowerShell✓ Tested
Exclude a directory from a recursive search
Linux Commands: Use prune to avoid descending into generated dependencies.
Linux Commands✓ Tested
Exclude elements from a collection
jQuery: not removes matching elements from the current selection.
jQuery✓ Tested
Extract a filename from a path
Linux Commands: Use basename with an explicit suffix when removing a known extension.
Linux Commands✓ Tested
Extract a parent directory from a path
Linux Commands: Use dirname without needing the path to exist.
Linux Commands✓ Tested
Filter history by its author identity
Git: The author filter selects commits by their recorded author metadata.
Git✓ Tested
Filter items in a pipeline
Keep numbers that meet a condition.
Where-Object✓ Tested
Find a commit that changed the count of a text string
Git: The pickaxe -S option finds commits that add or remove occurrences of a literal string.
Git✓ Tested
Find differences between two collections
PowerShell: Compare-Object marks reference-only values with a left arrow and difference-only values with a right arrow.
PowerShell✓ Tested
Find empty regular files
Linux Commands: Use the empty predicate with a file type constraint.
Linux Commands✓ Tested
Find files larger than a byte threshold
Linux Commands: Use the c suffix for exact byte units with GNU find size tests.
Linux Commands✓ Tested