From: "Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
To: David Kastrup <dak@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: Shell script cleanups/style changes?
Date: Fri, 3 Aug 2007 21:29:42 +0200 [thread overview]
Message-ID: <20070803192942.GA23432@informatik.uni-freiburg.de> (raw)
In-Reply-To: <86sl72j9vn.fsf@lola.quinscape.zz>
David Kastrup wrote:
> Robert Schiele <rschiele@gmail.com> writes:
>
> > On Thu, Aug 02, 2007 at 12:44:22PM +0200, David Kastrup wrote:
> >> ! logfile="${1#-?}"
> >
> > You can't do something like that on /bin/sh on many systems (for
> > instance Solaris).
>
> Sigh. It's in Posix.
Well Solaris is (kind of) Posix compliant---you need some extra effort
to get it into Posix "mode":
login@~ > uname -a
SunOS login 5.10 Generic_125100-10 sun4u sparc
login@~ > sh
$ set tralala
$ echo "${1#tra}"
lala
$ ^D
the "problem" here is, that my PATH includes /usr/xpg4/bin before
/usr/bin and that's non-standard (for Solaris). That is
/usr/xpg4/bin/sh is Posix compliant and /usr/bin/sh is compatible to
former versions of Solaris/SunOS and this one doesn't support these
substitutions:
login@~ > /usr/bin/sh
$ set tralala
$ echo "${1#tra}"
bad substitution
Having
login@~ > ls -l /bin
lrwxrwxrwx 1 root root 9 2006-07-03 09:29 /bin -> ./usr/bin
sadly the Solaris sh is used for shell scripts that use a shebang line
calling /bin/sh.
Best regards
Uwe
--
Uwe Kleine-König
http://www.google.com/search?q=5+choose+3
next prev parent reply other threads:[~2007-08-03 19:29 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-02 10:44 Shell script cleanups/style changes? David Kastrup
2007-08-02 14:00 ` Robert Schiele
2007-08-02 14:20 ` David Kastrup
2007-08-02 16:19 ` Robert Schiele
2007-08-02 17:05 ` Johannes Schindelin
2007-08-02 17:22 ` Robert Schiele
2007-08-03 19:29 ` Uwe Kleine-König [this message]
2007-08-02 14:48 ` Bradford Smith
2007-08-02 18:13 ` Sam Ravnborg
2007-08-02 20:37 ` Junio C Hamano
2007-08-02 20:56 ` Nguyen Thai Ngoc Duy
2007-08-02 21:02 ` David Kastrup
2007-08-02 21:12 ` Junio C Hamano
2007-08-02 20:57 ` David Kastrup
2007-08-02 21:21 ` Junio C Hamano
2007-08-02 21:29 ` Junio C Hamano
2007-08-02 22:02 ` David Kastrup
2007-08-02 21:41 ` Robert Schiele
2007-08-02 22:14 ` David Kastrup
2007-08-02 23:05 ` Junio C Hamano
2007-08-02 23:17 ` David Kastrup
2007-08-03 0:12 ` Junio C Hamano
2007-08-03 0:24 ` David Kastrup
2007-08-03 0:48 ` Junio C Hamano
2007-08-03 6:06 ` David Kastrup
2007-08-03 7:41 ` Junio C Hamano
2007-08-03 8:41 ` David Kastrup
2007-08-03 6:13 ` David Kastrup
2007-08-03 2:28 ` Robert Schiele
2007-08-03 6:08 ` David Kastrup
2007-08-02 23:21 ` Robert Schiele
2007-08-02 23:32 ` David Kastrup
2007-08-02 23:45 ` Robert Schiele
2007-08-02 23:52 ` David Kastrup
2007-08-03 0:01 ` Robert Schiele
2007-08-03 0:11 ` David Kastrup
2007-08-03 7:11 ` Junio C Hamano
2007-08-02 23:27 ` Robert Schiele
2007-08-04 7:10 ` Florian Weimer
2007-08-04 20:32 ` Robert Schiele
2007-08-04 20:39 ` Junio C Hamano
2007-08-02 21:42 ` David Kastrup
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=20070803192942.GA23432@informatik.uni-freiburg.de \
--to=ukleinek@informatik.uni-freiburg.de \
--cc=dak@gnu.org \
--cc=git@vger.kernel.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).