RE: [SLUG] Really an Odd One,,

From: Rock (mrock@stewartsigns.com)
Date: Fri Oct 24 2003 - 11:18:35 EDT


I have a record of every fax sent from this location. Each record
represents on line in a very large file. That data is used to route
incoming faxes to the last person who had fax contact with that same fax
number.

In testing, I have a single outgoing fax contact which I add to the
outgoing faxes file and then copy that file to the directory where it is
used to route faxes.

What is ending up in the final destination is not the complete file but
rather the single entry that I am updating the file with.

I am baffled. I have been over and over the script that creates and
updates the file before it is copied and can find no was that this can
happen.

Even the time stamp on the file shows it has been updated,,, but with
the wrong information. :o(

I think I am going to change file names in the program and see what
happens.

Michael C. Rock
Systems Analyst
Registered Linux User # 287973

"The time has come the walrus said to speak of many things,,"
"Christians give up what they cannot keep to gain what they cannot lose"

-----Original Message-----
From: slug@nks.net [mailto:slug@nks.net] On Behalf Of Eben King
Sent: Friday, October 24, 2003 10:55 AM
To: slug@nks.net
Subject: Re: [SLUG] Really an Odd One,,

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 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:21 EDT