Find last month abbreviation

2014-04-18 Thread lilit-aibolit
This works in linux: $ date --date=last month +%b Mar In OpenBSD i tried # MonthCurrent=`date +%m` # MonthPrevious=`expr $MonthCur - 1` # echo $MonthPrevious 3 But I need month's abbreviation.

Re: Find last month abbreviation

2014-04-18 Thread David Coppa
On Fri, Apr 18, 2014 at 2:24 PM, lilit-aibolit lilit-aibo...@mail.ru wrote: This works in linux: $ date --date=last month +%b Mar In OpenBSD i tried # MonthCurrent=`date +%m` # MonthPrevious=`expr $MonthCur - 1` # echo $MonthPrevious 3 But I need month's abbreviation. Install the

Re: Find last month abbreviation

2014-04-18 Thread Ingo Schwarze
Hi, lilit-aibolit wrote on Fri, Apr 18, 2014 at 03:24:36PM +0300: $ date --date=last month +%b Mar Time for a little shell golfing? Look, i'll play it nice and even add two blanks for readability. $ date -j +%b $(printf %02d01 $(( ($(date +%m)+11)%12 ))) Mar There is no need to install

Re: Find last month abbreviation

2014-04-18 Thread Remi Locherer
On Fri, Apr 18, 2014 at 04:06:18PM +0200, Ingo Schwarze wrote: Hi, lilit-aibolit wrote on Fri, Apr 18, 2014 at 03:24:36PM +0300: $ date --date=last month +%b Mar Time for a little shell golfing? Look, i'll play it nice and even add two blanks for readability. $ date -j +%b

Re: Find last month abbreviation

2014-04-18 Thread Philip Guenther
On Fri, Apr 18, 2014 at 7:50 AM, Remi Locherer remi.loche...@relo.ch wrote: On Fri, Apr 18, 2014 at 04:06:18PM +0200, Ingo Schwarze wrote: lilit-aibolit wrote on Fri, Apr 18, 2014 at 03:24:36PM +0300: $ date --date=last month +%b Mar Time for a little shell golfing? Look, i'll play it