This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: shift: can't shift that many
- To: Dan Holmsand <dan at innehallsbolaget dot com>
- Subject: Re: shift: can't shift that many
- From: Bob McGowan <rmcgowan at veritas dot com>
- Date: Tue, 13 Jun 2000 12:14:38 -0700
- CC: Cygwin mailing list <cygwin at sourceware dot cygnus dot com>, bug-bash at gnu dot org
- Organization: VERITAS Software
- References: <000501bfd565$597de7e0$a7d396c1@inneh3>
Dan Holmsand wrote:
>
> Actually, I think cygwin's sh is quite right - xemacs' installexe.sh tries
> to shift three args where there's only two. Changing "shift 2" to just
> "shift" in line 12 gets rid of the error message.
>
> /dan
>
> > -----Original Message-----
> > From: owner-xemacs-nt@xemacs.org [mailto:owner-xemacs-nt@xemacs.org]On
> > Behalf Of John A. Turner
> > Sent: den 13 juni 2000 14:03
> > To: XEmacs on NT; Cygwin mailing list; bug-bash@gnu.org
> > Subject: Re: shift: can't shift that many
> >
> >
> > "John A. Turner" wrote:
> > >
> > > I've successfully built a cygwin version of XEmacs 21.2.34
> > >
> > > however, during make install, I get lots of msgs from bash related
> > > to the shift built-in - as in the subject:
> > >
> > > shift: can't shift that many
> >
> > never mind - I can't believe this, but I've been bitten by the
> > "sh is really ash" feature in cygwin
> >
> > I've been using cygwin long enough to know better, but somehow
> > after an update I forgot to fix that
> >
The following script:
echo $#
shift 3
echo $#
echo shifting two more:
shift 2
echo $#
Produces the following output for sh (ash) and bash:
$ sh shiftest a b c d
4
1
shifting two more:
shift: can't shift that many
1
$ bash shiftest a b c d
4
1
shifting two more:
1
The only difference is the error message generated by ash. The final
result is the same, the last shift did not change the argument count.
I don't think this is a bug in either of shells, unless you want to
count not printing an error as the bug. It is a bug in the original
script, however.
--
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com