Re: Adding Date & Time to a script's output log

2017-06-01 Thread davidson
On Thu, 1 Jun 2017, Greg Wooledge wrote: On Thu, Jun 01, 2017 at 06:49:58PM +, david...@freevolt.org wrote: If you go this convenient-lexical-order route, note that %F is shorthand for %Y-%m-%d Not portable. See Whoa

Re: Adding Date & Time to a script's output log

2017-06-01 Thread Greg Wooledge
On Thu, Jun 01, 2017 at 06:49:58PM +, david...@freevolt.org wrote: > If you go this convenient-lexical-order route, note that %F is > shorthand for %Y-%m-%d Not portable. See And yeah, this is a Debian mailing list, but th

Re: Adding Date & Time to a script's output log

2017-06-01 Thread davidson
On Thu, 1 Jun 2017, Nicolas George wrote: Le tridi 13 prairial, an CCXXV, SUZANNE COBB a écrit : I try to capture the date and time into a variable named 'dt': dt= $(date '+%d/%m/%Y %H:%M:%S'); Note that %T is shorthand for %H:%M:%S [please see there is a space between = and $, and betwee

Re: Adding Date & Time to a script's output log

2017-06-01 Thread Dan Ritter
On Thu, Jun 01, 2017 at 03:24:05PM +, Ron Leach wrote: > People are so generous with their time. > > I hadn't realised that spaces were sometimes semantically relevant. (And I > liked Nicolas's detox joke, well done.) > In all computer languages, the presence or absence of a space is usual

Re: Adding Date & Time to a script's output log

2017-06-01 Thread Ron Leach
, not she. Many thanks, again, regards, Ron - Original Message - From: SUZANNE COBB To: Debian Users Sent: Thu, 01 Jun 2017 14:26:00 - (UTC) Subject: Adding Date & Time to a script's output log List, good afternoon, I am using a script to check and update a dynamic IP addres

Re: Adding Date & Time to a script's output log

2017-06-01 Thread Don Armstrong
On Thu, 01 Jun 2017, SUZANNE COBB wrote: > I try to capture the date and time into a variable named 'dt': > > dt= $(date '+%d/%m/%Y %H:%M:%S'); > > echo "%dt" "Changed ${DYN_DOMAIN} from ${registeredIp} to ${externalIp}" >> > /var/log/updated-ddns.log I think you want echo "$dt" "Cha[...]. % i

Re: Adding Date & Time to a script's output log

2017-06-01 Thread Nicolas George
Le tridi 13 prairial, an CCXXV, SUZANNE COBB a écrit : > I try to capture the date and time into a variable named 'dt': > > dt= $(date '+%d/%m/%Y %H:%M:%S'); > > [please see there is a space between = and $, and between Y and %] Well, fix it! This line executes the output of date as a command wi

Re: Adding Date & Time to a script's output log

2017-06-01 Thread Greg Wooledge
On Thu, Jun 01, 2017 at 02:26:00PM +, SUZANNE COBB wrote: > I try to capture the date and time into a variable named 'dt': > > dt= $(date '+%d/%m/%Y %H:%M:%S'); > > [please see there is a space between = and $, and between Y and %] The space after = is wrong. It will not work. You must rem

Re: Adding Date & Time to a script's output log

2017-06-01 Thread David Wright
On Thu 01 Jun 2017 at 14:26:00 (+), SUZANNE COBB wrote: > List, good afternoon, > > I am using a script to check and update a dynamic IP address in our DNS > records. I have tried to add a date and time output to a log file which > records IP address changes and updates - but the change I i

Adding Date & Time to a script's output log

2017-06-01 Thread SUZANNE COBB
List, good afternoon, I am using a script to check and update a dynamic IP address in our DNS records. I have tried to add a date and time output to a log file which records IP address changes and updates - but the change I inserted is not working. I think the problem is that I have not under