shift function does not work as expected.

Bug #548902 reported by Paul Belanger on 2010-03-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dash (Ubuntu)

Bug Description

Binary package hint: dash

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

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

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

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

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  Edit
Everyone can see this information.

Other bug subscribers