Re: feature request: allow shif [n] with n > $#

2019-04-15 Thread Robert Elz
Date:Mon, 15 Apr 2019 09:19:19 -0400 From:Greg Wooledge Message-ID: <20190415131919.gy6...@eeg.ccf.org> | > > setupargs="$@" | Also, you are squashing all of your filename arguments down into a | single string variable, This is simply an unspecified o

Re: feature request: allow shif [n] with n > $#

2019-04-15 Thread Greg Wooledge
On Mon, Apr 15, 2019 at 08:42:53AM -0400, Greg Wooledge wrote: > On Sat, Apr 13, 2019 at 09:43:47AM +0200, Toralf Förster wrote: > > Except, that I used the opposite: > > > > min_days=${1:-5} > > min_hours=${2:-12} > > min_compl=${3:-3500} > > shift "$(( $# < 3 ? $# : 3 ))" > >

Re: feature request: allow shif [n] with n > $#

2019-04-15 Thread Greg Wooledge
On Sat, Apr 13, 2019 at 09:43:47AM +0200, Toralf Förster wrote: > Except, that I used the opposite: > > min_days=${1:-5} > min_hours=${2:-12} > min_compl=${3:-3500} > shift "$(( $# < 3 ? $# : 3 ))" > setupargs="$@" So... this user interface of yours. It looks someth

Re: feature request: allow shif [n] with n > $#

2019-04-13 Thread Toralf Förster
On 4/13/19 9:42 AM, Toralf Förster wrote: > Yep - thx! Except, that I used the opposite: min_days=${1:-5} min_hours=${2:-12} min_compl=${3:-3500} shift "$(( $# < 3 ? $# : 3 ))" setupargs="$@" -- Toralf PGP C4EACDDE 0076E94E

Re: feature request: allow shif [n] with n > $#

2019-04-13 Thread Toralf Förster
On 4/13/19 3:54 AM, konsolebox wrote: > > shift "$(( n < $# ? n : $# ))" Yep - thx! -- Toralf PGP C4EACDDE 0076E94E

Re: feature request: allow shif [n] with n > $#

2019-04-12 Thread konsolebox
On Sat, Apr 13, 2019, 9:43 AM Robert Elz wrote: > Date:Thu, 11 Apr 2019 19:05:56 -0400 > From:Chet Ramey > Message-ID: <6973cbca-28bd-5a20-4966-1d8251e95...@case.edu> > > | If you want to be sure to shift out all existing parameters, use > | `shift $#'. If you wa

Re: feature request: allow shif [n] with n > $#

2019-04-12 Thread Robert Elz
Date:Thu, 11 Apr 2019 19:05:56 -0400 From:Chet Ramey Message-ID: <6973cbca-28bd-5a20-4966-1d8251e95...@case.edu> | If you want to be sure to shift out all existing parameters, use | `shift $#'. If you want something else, you can add logic to cap the | argument

Re: feature request: allow shif [n] with n > $#

2019-04-11 Thread Chet Ramey
On 4/11/19 4:18 PM, Toralf Förster wrote: > Given: > > $> cat #!/bin/bash > # > > shift 3 > > echo ">>${@}<<" > EOF > > then a call with less than 3 parameter, eg. "./shift.sh 1 2" gives ">>1 2<<". > Whilst the man page does not deny this behaviour I do wonder if a feature > reque