in reply to Re: Determine whether file is dos or unix format
in thread Determine whether file is dos or unix format

The "s" switch only affects what "." matches. It is therefore useless (albeit harmless) in your solution.