This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: base-files patch (atn: Eric Blake)
- From: "John Morrison" <john at morrison dot mine dot nu>
- To: cygwin at cygwin dot com
- Date: Sun, 8 May 2005 08:52:42 +0100 (BST)
- Subject: Re: base-files patch (atn: Eric Blake)
- References: <032520051926.2104.424465D60002AFD30000083822058861720A050E040D0C079D0A@comcast.net>
- Reply-to: john at morrison dot mine dot nu
On Fri, March 25, 2005 8:26 pm, Eric Blake said:
> True enough. And that points out another bug - echo "$0" may fail if $0
> starts with -, it should be echo -- "$0". Isn't portable shell
> programming fun?
Sorry that this has taken so long, but I'm just getting around to adding
all the fixes emailed wrt /etc/profile. I tried the above, and it broke
so I checked the man pages,
<quote>
`echo' writes each given STRING to standard output, with a space between
each and a newline after the last one. Synopsis:
echo [OPTION]... [STRING]...
The program accepts the following options. Also see *Note Common
options::. Options must precede operands, and the normally-special
argument `--' has no special meaning and is treated like any other
STRING.
</quote>
so, I'm afraid that echo -- "${0}" won't work.
J.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/