A
A
Alexander Semenenko2017-10-27 15:16:32
linux
Alexander Semenenko, 2017-10-27 15:16:32

What regular expression is suitable for grep?

Good afternoon! I'm trying to get lines from the file that contain either Archive or Clients and so that after these words there is an end of the line.
This is how it works: grep -E "Archive|Clients" but also shows those lines where these words are not at the end of the line.
But grep -E "Archive$|Clients$" doesn't work. Please help me figure it out, thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mureevms, 2017-10-27
@semenenko88

grep -e Archive$ -e Clients$ file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question