2
Is it possible to search and print only the matched pattern from grep. The default action is to print the whole line.
2
Is it possible to search and print only the matched pattern from grep. The default action is to print the whole line.
3
Yes. Use the -o
option, e.g.,
$ echo 'hello wide world' | grep -o wide
wide