home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.27 / text0070.txt < prev    next >
Encoding:
Text File  |  1992-05-20  |  1.1 KB  |  29 lines

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