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

Re: command substitution in a crontab with SHELL=/bin/bash



On Fri, Feb 23, 2001 at 08:11:31PM -0900, Britton wrote:
> 
> I am trying to do approximately this in a crontab:
> 
> SHELL=/bin/bash
> 0 8 * * * prog >/tmp/$(date +%s).extension
>
> Anyone have any guesses as to what might be going on here?

Someone hasn't read the manuals...? ;)

man 5 crontab:

                        Percent-signs  (%) in the command, unless
       escaped with backslash (\), will be changed  into  newline
       characters, and all data after the first % will be sent to
       the command as standard input.


...yes, I was wondering this one myself once. :)


-- 
Tommi Komulainen                                 Tommi.Komulainen@iki.fi
GPG 1024D/68388EE6    6FD6 DD79 EB38 BF6F 3533  09C0 04A8 9871 6838 8EE6

Attachment: pgpSwknBu4Ll6.pgp
Description: PGP signature


Reply to: