finding files in dos format + .sql files without an empty last line

Simon Geard delgarde at
Thu Feb 22 00:29:36 PST 2007

On Wed, 2007-02-21 at 23:54 +0200, Ag. Hatzimanikas wrote:
> Do you want to find files in dos format and with an empty line at the
> end?
> Do you want the opposite? (without an empty line)
> Do you want to append an empty line at the end to the converted files?
> Do you want to delete (if any) the empty last line to the converted files?

I think it's a question of whether the line-end character marks the end
of every line, or whether it separates two lines. I've seen programs
that parsed a file and ignored the last line if it didn't end in a
new-line character. Sounds like that's what Warren is encountering here,
separate from the DOS/Unix format issue.

I guess what we're looking for is a list of files for which the last
character of the file is a LF. Not sure how you'd do that, since grep
would presumably just ignore LF characters - you can't exactly match on
them, can you?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the blfs-support mailing list