Skip to main content
Search start of line
Source Link
hschou
  • 3k
  • 14
  • 16

Use egrep and output only match:

grep '^1\.' hello | egrep -o 'http.+'

The identifier 1. is found by searching at the beginning of the line with ^. Option -o will show --only-matching and .+ is a regular expression which will match all characters to end-of-line.

Use egrep and output only match:

grep '^1\.' hello | egrep -o 'http.+'

Option -o will show --only-matching and .+ is a regular expression which will match all characters to end-of-line.

Use egrep and output only match:

grep '^1\.' hello | egrep -o 'http.+'

The identifier 1. is found by searching at the beginning of the line with ^. Option -o will show --only-matching and .+ is a regular expression which will match all characters to end-of-line.

Source Link
hschou
  • 3k
  • 14
  • 16

Use egrep and output only match:

grep '^1\.' hello | egrep -o 'http.+'

Option -o will show --only-matching and .+ is a regular expression which will match all characters to end-of-line.