Skip to main content

cmd_grep_impl

Function cmd_grep_impl 

Source
pub(super) fn cmd_grep_impl(args: &[String]) -> Result<(), ShellError>
Expand description

Search for lines matching a pattern in a file or piped input.

Usage: grep <pattern> [path]

When invoked as the right-hand side of a pipe (cmd | grep pat), reads from pipe input instead of a file.