[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using at to restart dhcp server



On Thu, Oct 20, 2011 at 11:01:56AM +0200, Bonno Bloksma wrote:
> Hi Andrew,
> 
> >Obviously, if you create a cron job to run, then you can forget
> >about having the "at" scheduler in any script that might be
> >called, just have the script do what needs to be done /at/ the
> >crontab scheduled time.
> 
> The whole idea of using at in stead of cron is because this was just
> a one time thing. I know "all about cron" ;-) but was unable to
> figure out how at worked from just the man pages and what I was able
> to find with google.
> 
> Thanks for all the extra explanation, most was known by now but some
> was new like the use of the letters EOF in stead of the "real" EOF
> character.

Actually, just in case there's a misconception here, the magic word was
actually the "<<" operator. This starts what is known as a "here doc"
and says "The following lines (up to, but not including, some marker)
should be sent as input to the command".

So you could just as easily say:
   at 7pm <<Banana
   echo I want to run my program called 'EOF' now.
   EOF
   Banana
And "Banana" is used as the end-of-file marker.

-- 
Darac Marjal


Reply to: