syntax problem with cron

dballester at kernpharma.com dballester at kernpharma.com
Wed Sep 8 12:53:07 UTC 2004



put all in one shell script an call this shell

HTH


David Ballester Montolio
Responsable de Sistemas y Comunicaciones
Kern Pharma, S.L.
www.kernpharma.com

Personalmente, mis problemas de suministro de software legal se limitan a
averiguar qué debo poner detrás de "apt-get install ..." omni en barrapunto

Que parte de /sbin/ifconfig eth0|grep 'inet'|awk -F' ' '{print $2}'|sed -e
s/addr:// no entiendes?
:)
GNU!


|---------+-------------------------------->
|         |           Steven Stern         |
|         |           <subscribed-lists at ste|
|         |           rndata.com>          |
|         |           Enviado por:         |
|         |           fedora-list-bounces at r|
|         |           edhat.com            |
|         |                                |
|         |                                |
|         |           08/09/2004 14:50     |
|         |           Por favor, responda a|
|         |           For users of Fedora  |
|         |           Core releases        |
|         |                                |
|---------+-------------------------------->
  >-----------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                             |
  |     Para:     fedora-list at redhat.com                                                                                        |
  |     cc:                                                                                                                     |
  |     Asunto:   syntax problem with cron                                                                                      |
  >-----------------------------------------------------------------------------------------------------------------------------|




I'm having a problem running a command from cron that works well from the
command line.

The cron line is

  1 * * * * sleep $[ $RANDOM % 1800 ] ;/usr/bin/freshclam --quiet

When run from a /bin/sh command line, it works as expected.

When run from cron, I get an email with:

  /bin/sh: -c: line 1: unexpected EOF while looking for matching `]'
  /bin/sh: -c: line 2: syntax error: unexpected end of file

What am I missing?
--
  Steve



--
fedora-list mailing list
fedora-list at redhat.com
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list









More information about the users mailing list