1

For example, whey I type:

grep Eth test.sh

I will get

Summary: Ethernet settings tool for PCI ethernet cards

Say if I only need my searched pattern and exlucde all words ahead

Ethernet settings tool for PCI ethernet cards

How can I do this in grep?

Marcus Müller
  • 27,924
  • 4
  • 40
  • 79
user3815726
  • 420
  • 2
  • 5
  • 19

1 Answers1

0

With GNU grep:

grep -Po '\KEth.*' test.sh

Output:

Ethernet settings tool for PCI ethernet cards
Cyrus
  • 69,405
  • 13
  • 65
  • 117