FIND YOUR NEXT FEW LINES

Results for “by”

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

417 snippets foundClear filters
Linux CommandsGetting Started

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
Linux CommandsFinding & selecting files

Extract a filename from a path

Linux Commands: Use basename with an explicit suffix when removing a known extension.

Linux Commands✓ Tested
Linux CommandsFinding & selecting files

Extract a parent directory from a path

Linux Commands: Use dirname without needing the path to exist.

Linux Commands✓ Tested
C#Text validation & encoding

Extract all integer tokens from text

C#: Enumerate Match objects returned by Regex.Matches with an explicit timeout.

C#✓ Tested
Linux CommandsFinding & selecting files

Find empty regular files

Linux Commands: Use the empty predicate with a file type constraint.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

Find lines common to two sorted files

Linux Commands: Use comm -12 to suppress the two columns of unmatched lines.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

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
GitGetting Started

Find text inside tracked files

Git: Find text inside tracked files inside the disposable repository created by the input setup.

Git✓ Tested
JavaDates & time zones

Find the last day of a month

Java: Use YearMonth so leap years and month lengths are handled by the calendar library.

Java✓ Tested
C#Collections & data structures

Find values common to two collections

C#: Intersect returns distinct values shared by the inputs.

C#✓ Tested
Docker / ComposeContainer lifecycle

Force a disposable container to stop

Docker / Compose: kill sends SIGKILL by default without a graceful shutdown interval.

Docker / Compose✓ Tested
Linux CommandsDates & process utilities

Format a known UTC timestamp

Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.

Linux Commands✓ Tested