Re: cron error - date command

2020-02-02 Thread David Wright
On Sun 02 Feb 2020 at 17:32:59 (+1100), Keith Bainbridge wrote: > On 2/2/20 5:22 am, songbird wrote: > >it looks questionable to me just in that you > > may be writing to that file at the same time as > > you when you're doing something else that is also > > trying to write to that file. […]

Re: cron error - date command

2020-02-01 Thread Keith Bainbridge
On 2/2/20 5:22 am, songbird wrote: it looks questionable to me just in that you may be writing to that file at the same time as you when you're doing something else that is also trying to write to that file. Thankyou Songbird and Roberto. The solution was to escape the % signs in crontab (

Re: cron error - date command

2020-02-01 Thread songbird
Keith Bainbridge wrote: > Good evening All > > I have a niggling problem.Any suggestions, please? > > If I run > echo `date +%d%b%Y` >> /home/keith/.bash_history > in a xterm (Mate I think always), I get the expected result: a line in > .bash_history reads > > 2020Feb01 > followed by > echo `dat

Re: cron error - date command

2020-02-01 Thread Roberto C . Sánchez
On Sat, Feb 01, 2020 at 09:42:25PM +1100, Keith Bainbridge wrote: > Good evening All > > I have a niggling problem.Any suggestions, please? > > If I run > echo `date +%d%b%Y` >> /home/keith/.bash_history > in a xterm (Mate I think always), I get the expected result: a line in > .bash_history re

Re: cron error - date command

2020-02-01 Thread Keith Bainbridge
On 1/2/20 10:10 pm, Teemu Likonen wrote: If you don't want this % effect you need to escape those characters with backslash: echo `date +\%Y\%b\%d` Thankyou Worked just as I wanted. -- Keith Bainbridge keith.bainbridge.3...@gmail.com 0447 667 468

Re: cron error - date command

2020-02-01 Thread Teemu Likonen
Keith Bainbridge [2020-02-01T21:42:25+11] wrote: > echo `date +%Y%b%d` >> /home/keith/.bash_history > I have this line as a cron-job, and constantly get error messages: > > /bin/bash: -c: line 0: unexpected EOF while looking for matching ``' > /bin/bash: -c: line 1: syntax error: unexpected end

Re: cron error - date command

2020-02-01 Thread Reco
Hi. On Sat, Feb 01, 2020 at 09:42:25PM +1100, Keith Bainbridge wrote: > I have this line as a cron-job, and constantly get error messages: > > /bin/bash: -c: line 0: unexpected EOF while looking for matching ``' > /bin/bash: -c: line 1: syntax error: unexpected end of file > > and no ou