home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson)
-
- djm@eng.umd.edu (David J. MacKenzie) writes:
- >> What does
- >> echo a # b c
- >> produce if typed at an interactive shell? There is one sh-style shell out
- >> in the wide world that will echo 'a # b c' instead of just 'a' and I'd like
- >> to know if this behavior is POSIX-compiliant.
- [...]
- >The only explicit mention of `#' for the shell in p1003.2a is in the
- >description of the Vi editing mode.
-
- I hope not. Every Bourne shell I've ever used considered that any word
- commencing with an unquoted # introduces a comment extending through until
- the end of the line. If POSIX breaks this (even in interactive mode) lots
- of people will be pissed. Me for one.
- - Cameron Simpson
- cameron@cs.unsw.oz.au
-
- P.S. Consider the chaos when it's no longer safe to cat a script and
- cut/paste some of it into some shell window to get something done.
- Not a great example, but convenient and not uncommon in a windowing
- environment. Changing the rules for interactive mode is something to
- approach with fear and trepidation.
-
-
- Volume-Number: Volume 27, Number 70
-
-