Subject: Re: bin/2698: sh is fragile
To: None <netbsd-bugs@NetBSD.ORG>
From: Christoph Badura <bad@flatlin.ka.sub.org>
List: netbsd-bugs
Date: 08/16/1996 01:38:00
Peter Seebach writes:


>>Description:
>	Even the most trivial shell script produces syntax errors if there
>	are ^M's at the ends of lines.  Since ^M is whitespace, this is a
>	bug.  It looks like the source frequently checks for ' ' or '\t'.
>	It should probably check for isspace(c) && c != '\n'.

Since when does the Bourne shell treat ^M as whitespace?

18% cat -v gaga
ls^M
19% sh gaga
gaga: ls^M: not found
20%

This is a Xenix system and hence a SVR2 shell.
-- 
Christoph Badura	bad@flatlin.ka.sub.org

You don't need to quote my .signature.  Everyone has seen it by now.
Besides, it doesn't add anything to the current thread.