0

I know that the meta-character ^ means to match the empty string at the beginning. However, what does the '<' mean in grep?

Thanks!

Cyrus
  • 69,405
  • 13
  • 65
  • 117
Override
  • 9
  • 1

1 Answers1

-1

I'm pretty sure that's just the character being searched for?

diff shows the differences between two files, with <<<<< preceding lines only in the first file. piping it to grep pulls out all lines matching that regex: namely "lines that start with the '<' character". I don't think this is a very useful command, as you'd simply get a bunch of lines like so:

<<<<<
<<<<<
<<<<<
(etc...)

Maybe the purpose of the line is to detect if there are any differences between the files? (Otherwise, grep will find nothing)

Phildo
  • 836
  • 2
  • 17
  • 31