Val Krem wrote:
> Dave Rutherford wrote:
> > date -d 'next month' +%b%Y
> >
> > Note, I'm not sure that's robust if you call it on, say, the 31st of the
> > month
> > if the next month doesn't have 31 days. It might give you two months from
> > now.
> > Read the man page for date for further enl
2016-01-25 08:23:10 -0500, Greg Wooledge:
[...]
> Just to be clear, the -d 'human readable stuff' option is specific to GNU
> date, and won't work on other systems. Also, the 'human readable stuff'
> part is NOT specified. There is no documentation for what is allowed
> there, and what is not. Y
On Sun, Jan 24, 2016 at 11:58:27PM +, Val Krem wrote:
> So easy, I am just learning about bash scripting.
> date -d 'next month' +%b%Y
> What would happen in December 2016. Will it give me Jan2017?
Try It And See.
imadev:~$ gdate -d 'December 15, 2016 +1 month'
Sun Jan 15 00:00:00 EST 2017
Thank you very much!
So easy, I am just learning about bash scripting.
date -d 'next month' +%b%Y
What would happen in December 2016. Will it give me Jan2017?
Val!
On Sunday, January 24, 2016 5:31 PM, Dave Rutherford
wrote:
On Sun, Jan 24, 2016 at 5:30 PM, Val Krem wrote:
> I am trying
On Sun, Jan 24, 2016 at 5:30 PM, Val Krem wrote:
> I am trying to get a variable that combines the next month(Feb) and
current year (2016) from the current date
[...]
> temp_date=$(date | awk -F ' ' '{print $2,$6}' | tr -d ' ')
Wow, that's overkill. You don't need the -F ' ' options to awk, sin