[KLUG Members] Re: Re: grep, egrep, fgrep

Bruce Smith members@kalamazoolinux.org
Thu, 06 May 2004 16:15:09 -0400


> > Does the \n mean anything? Will it match if they are on the same line?
> 
> I think the \n should shell out as a "carriage return", equivalent to 
> pressing the enter key. 

No and Yes.

It's technically a "newline", which is the line separator on Unix/Linux
and is equivalent to pressing ENTER, but it is NOT a "carriage return"
character.

Windows separates lines with a CR/LF (carriage return / linefeed).
Unix/Linux separates lines with just a LF (linefeed).

So, "\n", aka "newline", is really a LF.

 - BS