Re: Create log file from script + midnight commander



On 2006-03-30, Geir Holmavatn <geir@xxxxxxxxxx> wrote:
Hi,

Complete newbie here :-|

I have managed to create a few scripts which are started from crontab.
However I would like a verification that they actually have been executed.

How do I include in my bash script code to append a line like "MyScript was
run at <current date / time>" to the text file 'cronjobs.log' (and that
cronjobs.log is created if it doesn't exist)...

I have tried this:
echo "MyScript started $(date) " >> /tmp/cronjobs.log
.. but get an 'Illegal variable name' error

You're using csh. switch to sh. Or use `date` instead of $(date).

How do I correct the above code to have it run correctly in FreeBSD?

Another newbie question: How do I install midnight commander i FreeBSD?

Sorry if this is too much to ask, but I learn a lot from examples

Thanks anyway

geir




.



Relevant Pages

  • Re: newbie mod_perl efficiency
    ... > I'm a newbie, and this may be a stupid question, but I haven't been able ... How much of a newbie are you? ... is it more efficient to load one giant CGI script into ... CGI scripts, it would never load any of the modules specific to ...
    (comp.lang.perl.modules)
  • Re: Create log file from script + midnight commander
    ... Complete newbie here:-| ... I have managed to create a few scripts which are started from crontab. ... However I would like a verification that they actually have been executed. ...
    (comp.unix.bsd.freebsd.misc)
  • Create log file from script + midnight commander
    ... I have managed to create a few scripts which are started from crontab. ... How do I include in my bash script code to append a line like "MyScript was ... Another newbie question: How do I install midnight commander i FreeBSD? ...
    (comp.unix.bsd.freebsd.misc)
  • Create log file from script code..
    ... Complete newbie here:-| ... I have managed to create a few scripts which are started from crontab. ... However I would like a verification that they actually have been executed. ...
    (comp.os.linux.misc)
  • Re: Finding all e-mail addresses in files on server.
    ... I am a newbie SA trying to find my way in my new ... The reason for needing to extract mail addresses is that different ... and notification system. ... to track these down and either retire the scripts or change the address ...
    (comp.unix.shell)

Loading