FIND YOUR NEXT FEW LINES

Results for “search history”

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

64 snippets foundClear filters
Linux CommandsSearching text

Branch on whether a pattern exists

Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.

Linux Commands✓ Tested
GitCommit history & revision selection

Check what kind of Git object a revision names

Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.

Git✓ Tested
GitCommit history & revision selection

Count commits reachable from a revision

Git: rev-list --count counts reachable commits without printing commit identifiers.

Git✓ Tested
Linux CommandsSearching text

Count matching lines

Linux Commands: Use grep -c to count matching lines rather than individual occurrences.

Linux Commands✓ Tested
Linux CommandsSearching text

Exclude matching lines

Linux Commands: Use grep -v to retain lines that do not start with a comment marker.

Linux Commands✓ Tested
GitCommit history & revision selection

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
Arduino / CArrays & embedded state

Find a value in a small lookup table

Arduino / C: A linear scan is simple and predictable for a small fixed array.

Arduino / C✓ Tested
GoSlices & collections

Find an item’s index

Find an item’s index using a complete Go program with explicit sample inputs.

Go✓ Tested
GitCommits & history

Find the commit responsible for a line

Inspect line attribution in a stable machine-readable format.

blame✓ Tested
GitCommit history & revision selection

List all files stored in a commit

Git: ls-tree inspects the committed tree without relying on working files.

Git✓ Tested
GitCommit history & revision selection

List files changed by the current commit

Git: diff-tree exposes the paths changed between a commit and its parent.

Git✓ Tested
Linux CommandsSearching text

List files containing a match

Linux Commands: Use grep -l when only the matching filenames are needed.

Linux Commands✓ Tested