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
  • 34,677
  • 4
  • 53
  • 94
user3815726
  • 520
  • 2
  • 6
  • 20

1 Answers1

0

With GNU grep:

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

Output:

Ethernet settings tool for PCI ethernet cards
Cyrus
  • 84,225
  • 14
  • 89
  • 153