git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David A. Wheeler" <dwheeler@dwheeler.com>
To: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Cc: Petr Baudis <pasky@ucw.cz>,
	tony.luck@intel.com, Linus Torvalds <torvalds@osdl.org>,
	linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	git@vger.kernel.org
Subject: Re: ia64 git pull
Date: Thu, 21 Apr 2005 23:30:18 -0400	[thread overview]
Message-ID: <42686FCA.2010605@dwheeler.com> (raw)
In-Reply-To: <17000.23588.462823.574142@sodium.jf.intel.com>

Petr Baudis <pasky@ucw.cz> writes:
>>Still, why would you escape it? My shell will not take # as a
>>comment start if it is immediately after an alphanumeric character.

I guess there MIGHT be some command shell implementation
that stupidly _DID_ accept "#" as a comment character,
even immediately after an alphanumeric.
If that's true, then using # there would be a pain for portability.

But I think that's highly improbable.  A quick peek
at the Single Unix Specification as posted by the Open Group
seems to say that, according to the standards, that's NOT okay:
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02
Basically, the command shell is supposed to tokenize, and "#"
only means comment if it's at the beginning of a token.

And as far as I can tell, it's not an issue in practice either.
I did a few quick tests on Fedora Core 3 and OpenBSD.
On Fedora Core 3, I can say that bash, ash & csh all do NOT
consider "#" as a comment start if an alpha precedes it.
The same is true for OpenBSD /bin/sh, /bin/csh, and /bin/rksh.
If such different shells do the same thing (this stuff isn't even
legal C-shell text!), it's likely others do too.

--- David A. Wheeler

      reply	other threads:[~2005-04-22  3:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200504212042.j3LKgng04318@unix-os.sc.intel.com>
     [not found] ` <Pine.LNX.4.58.0504211403080.2344@ppc970.osdl.org>
     [not found]   ` <200504212155.j3LLtho04949@unix-os.sc.intel.com>
     [not found]     ` <Pine.LNX.4.58.0504211520250.2344@ppc970.osdl.org>
2005-04-21 22:58       ` ia64 git pull Petr Baudis
     [not found]     ` <200504212301.j3LN1Do05507@unix-os.sc.intel.com>
     [not found]       ` <20050422012546.GD1474@pasky.ji.cz>
     [not found]         ` <17000.22515.170455.192374@sodium.jf.intel.com>
2005-04-22  1:53           ` Petr Baudis
2005-04-22  2:06             ` Inaky Perez-Gonzalez
2005-04-22  3:30               ` David A. Wheeler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42686FCA.2010605@dwheeler.com \
    --to=dwheeler@dwheeler.com \
    --cc=git@vger.kernel.org \
    --cc=inaky@linux.intel.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=tony.luck@intel.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).