Is it fair to say, "sed supports # comments starting any column"?

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
GNU sed supports comments starting any column. In other words, the following script works:
 

 s/x/y/ # Silly comment 1
 s/a/b/ # Silly comment 2
 

 I am told that some sed versions only support comments that start in column 1. I don't doubt it. I suppose those sed versions would crash or otherwise malfunction on the above script. Seems primitive to me. :( And coming from a sed user, calling something primitive is saying something. :)
 

 The POSIX specification does not restrict comments to start in column 1. Thus, POSIX says comments can start in any column. Thus, this difference between GNU and other versions seems not a "GNU extension". 
 

 http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
 

 So here are my questions for the experts on the egroup:
 

 1) Which actively maintained sed versions require comments to start in column 1?
 

 2) I have nothing against these other versions. The more versions, the better. But if POSIX says comments can start in any column, why aren't these other versions "fixed up" to be compliant, or even to be adequate? It shouldn't be all that difficult. If they aren't "fixed up", are they really actively maintained?
 

 3) Given POSIX, is it fair to say, "sed supports # comments starting any column"? 
 

 4) What other standard overrides POSIX, and justifies other seds not getting "fixed up"?
 

 Thanks,
 Daniel
 



[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.