Is there a way to make grep match the
absence of a leading character?
Here's an examle.
Say I want to find the string "bcd",
but I don't want to match zbcd, abcd
or any other leading character in front of bcd
except for a blank character or when bcd
starts at the beginning of a row, in which
case there is no character in front of bcd.
I could do grep " bcd ", but that wouldn't work
if bcd is the first word on a line.
Thanks in adavance,
Robert
Robert G. Jordan
Robert@JORDAN2000.com
Unix Sys Admin
Chicago, Illinois U.S.A.
absence of a leading character?
Here's an examle.
Say I want to find the string "bcd",
but I don't want to match zbcd, abcd
or any other leading character in front of bcd
except for a blank character or when bcd
starts at the beginning of a row, in which
case there is no character in front of bcd.
I could do grep " bcd ", but that wouldn't work
if bcd is the first word on a line.
Thanks in adavance,
Robert
Robert G. Jordan
Robert@JORDAN2000.com
Unix Sys Admin
Chicago, Illinois U.S.A.