Re: [SLUG] Really an Odd One,,

From: Eben King (eben1@tampabay.rr.com)
Date: Fri Oct 24 2003 - 10:55:24 EDT


On Fri, 24 Oct 2003, Rock wrote:

> I have a shell script program that when I run it as root the program
> works flawlessly. So, I put it in cron to run every hour. When cron
> runs the program it appears to screw up a simple cp command and the
> results are not what I expect.

What is the command, and how is it different?

> What ends up being copied is not what is in the file to be copied, but
> rather it seems to copy a file that is a part of the finished file. If
> that makes sense. I manipulate data until it is in the form that I want
> and then copy the finished data file to another directory for use.
>
> Run from a command line as root, the programs works just fine.

Guess: Some environmental variable is different when run by cron than when
run manually. Run 'env | sort > file1' from cron, then 'env | sort >
file2 ' by hand, and compare (diff, comm, or whatever).

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

A: Because it looks dumb and is hard to read. Q: Why is top-posting wrong? -- from lots42@xxx.com

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:07:11 EDT