P
P
Printip2017-08-22 12:34:07
linux
Printip, 2017-08-22 12:34:07

How to put a dash in grep?

Hello! Please tell me how to crack this:
-site/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
longclaps, 2017-08-22
@longclaps

grep "\-site/" входной_файл

R
Roman Mirilaczvili, 2017-08-22
@2ord

longclaps is not quite right
Correctly:
Simply, you need to escape some characters, because they are regular expression syntax.
rubular.com/r/di7PUGZ0Mq

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question