All of lore.kernel.org
 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: Fri, 22 Apr 2005 03:30:18 +0000	[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

WARNING: multiple messages have this Message-ID (diff)
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:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21 20:42 ia64 git pull tony.luck
2005-04-21 21:08 ` Linus Torvalds
2005-04-21 21:55   ` tony.luck
2005-04-21 21:55     ` tony.luck
2005-04-21 22:29     ` Linus Torvalds
2005-04-21 22:29       ` Linus Torvalds
2005-04-21 22:58       ` Petr Baudis
2005-04-21 22:58         ` Petr Baudis
2005-04-21 23:01       ` tony.luck
2005-04-21 23:01         ` tony.luck
2005-04-21 23:19         ` Linus Torvalds
2005-04-21 23:19           ` Linus Torvalds
2005-04-22  0:19           ` Bernd Eckenfels
2005-04-22  0:20           ` Petr Baudis
2005-04-22  0:20             ` Petr Baudis
2005-04-22  1:25         ` Petr Baudis
2005-04-22  1:25           ` Petr Baudis
2005-04-22  1:48           ` Inaky Perez-Gonzalez
2005-04-22  1:48             ` Inaky Perez-Gonzalez
2005-04-22  1:53             ` Petr Baudis
2005-04-22  1:53               ` Petr Baudis
2005-04-22  2:06               ` Inaky Perez-Gonzalez
2005-04-22  2:06                 ` Inaky Perez-Gonzalez
2005-04-22  3:30                 ` David A. Wheeler [this message]
2005-04-22  3:30                   ` David A. Wheeler
2005-04-21 22:53     ` Petr Baudis
2005-04-21 22:53       ` Petr Baudis
2005-04-21 21:24 ` Linus Torvalds
2005-04-22  3:37 ` Horst von Brand
2005-04-22  3:37   ` Horst von Brand

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.