Results for “by”
Small, practical examples. Search by task or narrow things down below.
Extract a field from simple delimited text
Linux Commands: Extract a field from simple delimited text using GNU/Linux commands in an empty practice directory.
Linux Commands✓ 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
Extract all integer tokens from text
C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.
C#✓ Tested
Find empty regular files
Linux Commands: Use the empty predicate with a file type constraint.
Linux Commands✓ Tested
Find lines common to two sorted files
Linux Commands: Use comm -12 to suppress the two columns of unmatched lines.
Linux Commands✓ Tested
Find lines unique to the first sorted file
Linux Commands: Use comm -23 to retain only records absent from the second input.
Linux Commands✓ Tested
Find text inside tracked files
Git: Find text inside tracked files inside the disposable repository created by the input setup.
Git✓ Tested
Find the last day of a month
Java: Use YearMonth so leap years and month lengths are handled by the calendar library.
Java✓ Tested
Find values common to two collections
C#: Intersect returns distinct values shared by the inputs.
C#✓ Tested
Force a disposable container to stop
Docker / Compose: kill sends SIGKILL by default without a graceful shutdown interval.
Docker / Compose✓ Tested
Format a known UTC timestamp
Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.
Linux Commands✓ Tested