Linux Administration
medium

Pregunta de Linux Administration #019e3987

Enunciado de la Pregunta
Linux Administration
#grep
#regex
#inverted-match
#line-end-anchor
Medio

Which grep command will print only the lines that do not end with a / in the file foo?

A

grep '/$' foo

B

grep '/#' foo

C

grep -v '/$' foo

Correcto
D

grep -v '/#' foo

Explicación Oficial / Explicaciones de la Comunidad

The -v option inverts the match. The regex /$ matches the / character at the end of a line ($). Combined, it prints lines that do NOT end with a slash.