Skip to content
Advertisement

Get lines that end with “$” in a text file

I have an output like this:

JavaScript

What i want is just this line:

JavaScript

To be more clear, I want those line ending with a specific string. I want to grep lines that have a / character at their last column.

Advertisement

Answer

You can use $ like this:

JavaScript

As $ stands for end of line, /$ matches those lines whose last character is a /.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement