Login
You're viewing the dmv.community public feed.
  • Sep 24, 2026, 8:55 AM

    Knowing how to grep for something that starts with a « - » doesn't come up much, but it does come up now and then. If i want to find which lines mention « -lfreetype », i can't do

    grep -lfreetype *

    but these both work
    grep -e -lfreetype *
    and
    grep -- -lfreetype *

    -e explicitly gives a match expression as the next argument so it doesn't matter if looks like an option;
    -- is the traditional POSIX way to finish option processing and declare that all subsequent args are in fact true args and not options.

    #Unix #grep

    💬 0🔄 0⭐ 1