Options (3)
-c, --countbooleanFind files containing "foo" and display count of matches in each file
Example:
pt {{[-c|--count]}} {{foo}}booleanFind files containing "foo" as a whole word and ignore its case
Example:
pt {{[-wi|--word-regexp --ignore-case]}} {{foo}}-G, --file-search-regexpbooleanFind "foo" in files with a given extension using a `regex`
Example:
pt {{[-G|--file-search-regexp]}}='{{\.bar$}}' {{foo}}Examples (5)
Find files containing "foo" and print the files with highlighted matches
pt fooFind files containing "foo" and display count of matches in each file
pt [-c|--count] fooFind files containing "foo" as a whole word and ignore its case
pt [-wi|--word-regexp --ignore-case] fooFind "foo" in files with a given extension using a `regex`
pt [-G|--file-search-regexp]='\.bar$' fooFind files whose contents match the `regex`, up to 2 directories deep
pt --depth=2 -e '^ba[rz]*$'made by @shridhargupta | data from tldr-pages