<div dir="ltr">Ok, see what happened. The verison of neomutt that came with my ubuntu version was from 2017 and startup-hook and shutdown-hook did not support the "echo" function<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 10, 2019 at 4:35 AM Richard Russon <<a href="mailto:rich@flatcap.org">rich@flatcap.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Steve,<br>
<br>
> has anyone got executing shellscripts with startup-hook or shutdown-hook<br>
<br>
A simple way to do it is to use backticks (``).<br>
(tested with 2018-07-16 and 2019-11-02)<br>
<br>
    startup-hook  'echo "`date | tee -a startup.log`"'<br>
    shutdown-hook 'echo "`date | tee -a shutdown.log`"'<br>
<br>
The hooks are expecting a *NeoMutt* command, so we'll use 'echo'.<br>
Anything put in backticks (``) will be executed and its output will be<br>
passed to the 'echo' command.  We quote ("") the backticks just in case<br>
there's whitespace in the output.<br>
<br>
The command writes the date to a file, but also displays it to the user.<br>
The message isn't visible because of lots of redrawing during startup,<br>
but you can see it in the logs ('M' <show-log-messages>).<br>
<br>
Cheers,<br>
    Rich / FlatCap<br>
</blockquote></div>