backslash in crontab

Antoine Jacoutot ajacoutot at lphp.org
Sat May 31 03:58:27 PDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 31 May 2003 12:04, Matthew Seaman wrote:
> Yes -- the entry in the crontab file has to be all on one line, as
> you've discovered.  If you absolutely have to reformat things, then
> generally the way to go is to create a shell script containing your
> complex command and run that out of cron instead:
>
> crontab entry:
>
>     0 2 * * * myscript
>
>     % cat <<E_O_SCRIPT > myscript
>     #!/bin/sh
>
>     command A && \
>         command B && \
>         command C
>     E_O_SCRIPT

Thanks :)

Antoine
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE+2IrFY3Hnhkr+5cQRAqx4AJ46FZYC+hc2P5CeiSiPQ3UkpXQfFgCffUwa
gICDT683Oz+1i3G6RajG3X8=
=oc4D
-----END PGP SIGNATURE-----



More information about the freebsd-questions mailing list