[lug] regular expression question

Ted Logan ted.logan at gmail.com
Tue Dec 4 10:10:16 MST 2007

On Dec 4, 2007 9:31 AM, Kevin Kempter <kevin at kevinkempterllc.com> wrote:
> Can anyone tell me specifically what the '/$' bit is in this grep stmt?
> ls -1tp | grep -v '/$' | head -1

That matches a '/' (forward slash) followed by the end-of-line (which
the $ matches in regular expressions). So ultimately the whole command
will print out the first file in the current directory, excluding

Ted Logan
ted.logan at gmail.com

More information about the LUG mailing list