[Cialug] lsof! grep?

Todd Walton tdwalton at gmail.com
Tue Jul 1 10:30:05 CDT 2008


On Mon, Jun 30, 2008 at 6:20 PM, Jeffrey Ollie <jeff at ocjtech.us> wrote:
> On Sun, Jun 29, 2008 at 9:03 AM, Todd Walton <tdwalton at gmail.com> wrote:
>> lsof | awk '{print $9}' | grep \\.so | sort -u
>
> Grep uses regular expressions to match lines.  A period in a regular
> expression means "match any character".  A backslash in front of the
> period tells grep to not give the period any special meaning and to
> match just a period. The second backslash in front of the other
> backslash escapes the backslash for the shell.

Oh.  So could I accomplish the same thing with:
     grep ".so"

-todd


More information about the Cialug mailing list