Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Use cron to repair permissions on a regular basis' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use cron to repair permissions on a regular basis
Authored by: Herschel on Dec 01, '04 10:31:29AM

I'm hoping Shawn might read this, because I tried his script but can't get it to run! I'm admittedly a UNIX novice, but I copied everything down meticulously and followed all the instructions. However on running /etc/weekly I kept getting:

/etc/weekly.local: line 4: unexpected EOF while looking for matching ``'
/etc/weekly.local: line 8: syntax error: unexpected end of file

What have I done wrong - I'm certain its my cock-up. Please help because this little script could really help me out.

[ Reply to This | # ]
Use cron to repair permissions on a regular basis
Authored by: d1taylor on Dec 02, '04 12:49:01AM
That's always a problem with mismatched quotes. Unix is pretty picky when it comes to closing your quotes with the same ones you opened it with, so something like

echo 'this is a test"

will generate an error exactly like what you saw. Check through for matching quotes on each line and I bet you'll figure out the problem. If not, pop over to my Ask Dave Taylor site and you can see (tomorrow, at least) how I solve this same problem with a script... :-)

[ Reply to This | # ]

Thanks Dave
Authored by: Herschel on Dec 02, '04 10:40:16AM

Thanks for that - I wasn't as accurate as I thought - using human grammar :D
Well got it to run except... now I get:

Repairing Permissions on System Drive
/etc/weekly.local: line 6: diskutil: command not found

This has got me very vexxed. "diskutil" is a perfectly acceptable command so why is it refusing to obey?

[ Reply to This | # ]