On 09/15/11 23:24, Abel Abraham Camarillo Ojeda wrote:
On Thu, Sep 15, 2011 at 4:19 PM, Pascal Stumpf wrote:
On Thu, Sep 15, 2011 at 12:06:14PM +, Thorsten Glaser wrote:
Abel Abraham Camarillo Ojeda verlet.org> writes:
Some of our shell scripts that work with dates and do something lik
On Thu, Sep 15, 2011 at 5:46 PM, Thorsten Glaser wrote:
> Abel Abraham Camarillo Ojeda dixit:
>
>>I meant portable among other shells, or bourne shell...
>
> They donbt have $((b&)) either, sob&
>
> bye,
> //mirabilos
> --
> Yay for having to rewrite other people's Bash scripts because bash
> sud
Abel Abraham Camarillo Ojeda dixit:
>On Thu, Sep 15, 2011 at 4:19 PM, Pascal Stumpf wrote:
>>> month=10#$(date +%m)
>>
>> Is that a mkshism?
No, that's proper Korn shell.
>> The easiest solution here is:
>>
>> typeset -Z2 month
That can break as soon as month is made an integer someplace down
On Thu, Sep 15, 2011 at 09:58:13PM +, Thorsten Glaser wrote:
> >> typeset -Z2 month
>
> That can break as soon as month is made an integer someplace down.
And that's very likely to happen ...
> Padding is meant for output, not input.
You don't know if $month is input or output.
> tg@stink
Abel Abraham Camarillo Ojeda dixit:
>I meant portable among other shells, or bourne shell...
They donbt have $((b&)) either, sob&
bye,
//mirabilos
--
Yay for having to rewrite other people's Bash scripts because bash
suddenly stopped supporting the bash extensions they make use of
-- To
On Thu, Sep 15, 2011 at 4:58 PM, Thorsten Glaser wrote:
> Abel Abraham Camarillo Ojeda dixit:
>
>>On Thu, Sep 15, 2011 at 4:19 PM, Pascal Stumpf wrote:
>
month=10#$(date +%m)
>>>
>>> Is that a mkshism?
>
> No, that's proper Korn shell.
>
>>> The easiest solution here is:
>>>
>>> typeset -Z2
On Thu, Sep 15, 2011 at 04:24:37PM -0500, Abel Abraham Camarillo Ojeda wrote:
> Yep, I did that in some scripts, just
> don't know how portable it is...
I haven't come across a single ksh that doesn't support that. Even the
old ksh88 on AIX 4.3.3 at my university has it.
On Thu, Sep 15, 2011 at 4:19 PM, Pascal Stumpf wrote:
> On Thu, Sep 15, 2011 at 12:06:14PM +, Thorsten Glaser wrote:
>> Abel Abraham Camarillo Ojeda verlet.org> writes:
>>
>> > Some of our shell scripts that work with dates and do something like:
>> >
>> > month=`date +%m`
>> > something && m
On Thu, Sep 15, 2011 at 12:06:14PM +, Thorsten Glaser wrote:
> Abel Abraham Camarillo Ojeda verlet.org> writes:
>
> > Some of our shell scripts that work with dates and do something like:
> >
> > month=`date +%m`
> > something && month=$((month-1))
>
> month=10#$(date +%m)
Is that a mkshis
* Thorsten Glaser [2011-09-15 14:15]:
> Abel Abraham Camarillo Ojeda verlet.org> writes:
>
> > Some of our shell scripts that work with dates and do something like:
> >
> > month=`date +%m`
> > something && month=$((month-1))
>
> month=10#$(date +%m)
awesome.
trying to be clever is always so
Abel Abraham Camarillo Ojeda verlet.org> writes:
> Some of our shell scripts that work with dates and do something like:
>
> month=`date +%m`
> something && month=$((month-1))
month=10#$(date +%m)
bye,
//mirabilos
On Mon, Sep 12, 2011 at 5:08 PM, Tobias Ulmer wrote:
>
> Fix your script, add the leading zero after you're done with the
> calculation.
>
I'm already doing that, just wasn't sure if it was a bug...
Thanks.
On Mon, Sep 12, 2011 at 04:45:28PM -0500, Abel Abraham Camarillo Ojeda wrote:
> Some of our shell scripts that work with dates and do something like:
>
> month=`date +%m`
> something && month=$((month-1))
>
> Suddenly started crashing on august... there seems to be a bug identifying
> not-numbers
* Abel Abraham Camarillo Ojeda [110913 01:46]:
> Some of our shell scripts that work with dates and do something like:
>
> month=`date +%m`
> something && month=$((month-1))
>
> Suddenly started crashing on august... there seems to be a bug identifying
> not-numbers (numbers with leading zeroes)
On 09/12/2011 05:45 PM, Abel Abraham Camarillo Ojeda wrote:
Some of our shell scripts that work with dates and do something like:
month=`date +%m`
something&& month=$((month-1))
Suddenly started crashing on august... there seems to be a bug identifying
not-numbers (numbers with leading zeroes)
Some of our shell scripts that work with dates and do something like:
month=`date +%m`
something && month=$((month-1))
Suddenly started crashing on august... there seems to be a bug identifying
not-numbers (numbers with leading zeroes) before '08' (eigth), how to reproduce:
$ for i in 0{0,1,2,3,
16 matches
Mail list logo