> -----Original Message----- > From: The Black Man [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 04, 2001 1:31 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: matching EOF within a regex > > > Hi Jeff, > > Thanks a lot. That was exactly what I was looking > for. > > -James > --- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > > On Oct 4, The Black Man said: > > > > >I'm trying to quickly insert a newline at the end > > of a > > >bunch of files, but haven't been able to find an > > EOF > > >metacharacter for use within a regexp. Anyone have > > >any sugestions? > > > > Unless your EOF is different from mine, \cD will > > match it.
Wait a minute. Are you saying your files actually have a Control-D at the end? Control-D is a common character used by terminal drivers to indicate end-of-file, (stty eof) but it's captured by the driver. There is no "end-of-file" character in Unix. You know when you hit the end of file when read(2) returns less than the requested length. Or am I totally missing something? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]