Hi Terry,

> the messages are being echoed when I simply type 'sudo /etc/rc.local'
> in a shell but not when it is executed at boot up.

Another command for your rc.local test is

    logger -t terry this is logger

> Also, I know the command is being executed correctly at boot up,
> because, although I don't get the message, I do get the O/P of rdate,
> which is something along the lines of 'clock adjusted by xyz seconds'.

You're running `rdate -v' that, if I'm reading the right source, puts
that message to stdout.
http://openrdate.cvs.sourceforge.net/viewvc/openrdate/openrdate/src/rdate.c?revision=1.1&view=markup#l164

> Is there some mechanism that directs the O/P of echo to stdout once
> the system has booted but to somewhere else while it is being booted?

echo(1) always goes to stdout.  It and other commands just blindly
write(2) to file descriptor 1, trusting that it has been set up to where
something else wants it to go.  /etc/rc.local could be run with its file
descriptor 1 not connected to what you're seeing, e.g. a TTY, but in
that case I'd expect rdate's writing to FD 1 to also disappear too.

> Finally, I also realised last night that all the examples of echo that
> I had seen were written as echo foo, whereas I have written echo
> "foo".  Could this have any bearing?

Probably not, depending what you had for the `foo'.  It would be helpful
to see the contents of /etc/rc.local where your echo and rdate reside.

BTW, this is all fairly basic shell scripting stuff, e.g. quoting with
"" or '' or ``, with a little knowledge of how Unix works.  I know you
think you don't need to know it, and can stick with Python, or the
electronics, but you're clearly having a tough time of it learning
piecemeal from a hotchpotch of problems rather than a planned gentle
introduction.

I learnt from two of Unix's creators, Kernighan and Pike's _The Unix
Programming Environment_, http://amzn.to/16SVwhD and it's what I still
recommend, though the price seems to have kept pace with inflation over
the decades.  There are second-hand ones available though.

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-10-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to