shift function does not work as expected.

Bug #548902 reported by Paul Belanger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: dash

Currently the 'shift' function in dash does not work as expected.

$ /bin/bash -c 'shift; echo hi'
hi

$ /bin/dash -c 'shift; echo hi'
shift: 1: can't shift that many

Revision history for this message
Paul Belanger (pabelanger) wrote :

$ uname -a
Linux pbelanger-desktop 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux

Ubuntu 9.10

Revision history for this message
Jilles Tjoelker (jilles) wrote :

I think you should just cope with this (by not shifting more than $#), as there are other shells with the same behaviour.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.