I told you you had an extra carriage return in there.  I also said to
hex edit the file and replace the second to last '0A' (LF) with a '20'
(space).  I didn't say nuke it.  And that was for the slocate.cron only.
If you open the file in the hex editor the offending character is just
to the left of the last brace (right hand curly bracket).

When you're done you should have only one /etc/cron.daily/slocate.cron
file and the slocate.cron~ one should not exist.

Ken Wilson
First Law of Optimization: The speed of a nonworking program is
irrelevant
(Steve Heller, 'Efficient C/C++ Programming')

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of John Aldrich
> Sent: Friday, September 03, 1999 4:40 AM
> To: [EMAIL PROTECTED]
> Subject: [newbie] slocate
>
>
> Hey....I had an error with a built-in cron job a few days ago and
> someone told me I had an extra carriage-return in there, so I nuked
> it. Now it tells me "unexpected end of file." (below is the EXACT
> quote...):
> From root  Thu Sep  2 04:02:07 1999
> Return-Path: <root>
> Received: (from root@localhost)
>       by slave1.chattanooga.net (8.9.3/8.9.3) id EAA11373
>       for root; Thu, 2 Sep 1999 04:02:03 -0400
> Date: Thu, 2 Sep 1999 04:02:03 -0400
> Message-Id: <[EMAIL PROTECTED]>
> From: [EMAIL PROTECTED] (Cron Daemon)
> To: [EMAIL PROTECTED]
> Subject: Cron <root@slave1> run-parts /etc/cron.daily
> X-Cron-Env: <SHELL=/bin/bash>
> X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
> X-Cron-Env: <MAILTO=root>
> X-Cron-Env: <HOME=/>
> X-Cron-Env: <LOGNAME=root>
>
> /etc/cron.daily/slocate.cron: line 6: syntax error:
> unexpected end of file
> /etc/cron.daily/slocate.cron~: line 6: syntax error:
> unexpected end of file
>
> From root  Fri Sep  3 04:02:08 1999
> Return-Path: <root>
> Received: (from root@localhost)
>       by slave1.chattanooga.net (8.9.3/8.9.3) id EAA12039
>       for root; Fri, 3 Sep 1999 04:02:04 -0400
> Date: Fri, 3 Sep 1999 04:02:04 -0400
> Message-Id: <[EMAIL PROTECTED]>
> From: [EMAIL PROTECTED] (Cron Daemon)
> To: [EMAIL PROTECTED]
> Subject: Cron <root@slave1> run-parts /etc/cron.daily
> X-Cron-Env: <SHELL=/bin/bash>
> X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
> X-Cron-Env: <MAILTO=root>
> X-Cron-Env: <HOME=/>
> X-Cron-Env: <LOGNAME=root>
>
> /etc/cron.daily/slocate.cron: line 6: syntax error:
> unexpected end of file
> /etc/cron.daily/slocate.cron~: line 6: syntax error:
> unexpected end of file
> ==========
> Here's the cron job:
> #!/bin/sh
>
> [ -e /usr/bin/updatedb ] && { sh /usr/bin/updatedb } || {
>       /usr/bin/slocate -u -e /tmp -e
> "/var/tmp,/usr/tmp,/afs,/net,/proc"
> }
> ============
> What's the problem with this??? Why does it say unexpected end of
> file?
> Thanks...
>       John
>
>
>

Reply via email to