Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jolly Roger Newsgroups: comp.sys.mac.system Subject: Re: Bash Script Problem Date: 22 Aug 2015 19:59:38 GMT Organization: People for the Ethical Treatment of Pirates Lines: 28 Message-ID: References: <1m9k0ik.l4day0m0szjaN%csampson@inetworld.net> X-Trace: individual.net o9w7czzR5UHxtpKYPqlOVA1l/gjJFPwi1xnBfonWJ5DTgelDJn Cancel-Lock: sha1:GVfUicMNK82rzo9/LC+FZJ4okGQ= X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1Y%b|b-Y~()~\t,LZ3e up1/bO{=-) User-Agent: slrn/1.0.1 (Darwin) Xref: csiph.com comp.sys.mac.system:78783 On 2015-08-22, Charles H. Sampson wrote: > I'm having a problem with a Bash script. I've spent a lot of time on it > and I'm very frustrated. I'm sure I'm going to be more upset when I find > out what the solution is. > > Here are the first few lines of the scipt: > > #!/bin/bash > logfile="file-name-wth-complete-path-containing-no-spaces" > datetime=`date +"%y/%m/%d %H:%M:%S"` > echo $datetime script started >> $logfile > > The problem is that the startup message doesnt get put to the logfile. Interesting. I ran the above code, with no modifications, and a file named "file-name-wth-complete-path-containing-no-spaces" was created on my desktop containing: 15/08/22 12:58:37 script started If you run the above code without any modifications, do you see the same result? -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR