0

Good morning guys, I'm trying to extract from this file

I have necessary extract only alls links with pattern '/9.4.10/':

grep "/9.4.10/" test.txt

After this command i have see all links

How can I solve this problem?

1
  • grep returns a matching line. In your file you have 14 lines according to cat test.txt | wc -l , so grep is not the tool you want, as one matching will return the whole huge line. Commented Apr 11, 2019 at 10:14

1 Answer 1

1

Maybe help to pull out all the links, and then grep.

Try it:

cat test.txt | grep -Eo "(http|https)://[\da-z./?A-Z0-9\D=_-]*" | grep "\/9.4.10\/"
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.