As title says, what does grep ^- mean in UNIX? I know what grep is but not the metacharater ^- part.
^
is the regular expression meta character for start of line
-
in this context is not a metacharacter
This expression therefore matches any - character at the start of a line and with grep will return any line starting with -
will match
-Hello world
Won't match
Hello - world