Shell script failing, can't open log file

Status
Not open for further replies.

WoodenToys.ie

New Member
Hi folks,

I'm trying to run a shell script via cron tab but it's not working. I have redirected stdout to a log file and have also redirected stderr to another logfile.

I can see the error and log files via ftp but I can't open them - I get ftp error 550 (file or directory doesn't exist)

The log files are not empty and from the log file size in bytes I can tell how far in the script it's getting before failing - however I can't open either the log file or the error file to see what's going wrong!

I can get the script to mail me both files before the failure point in the script and this works, but it doesn't work after the point in the script where it fails, so it's of no use... I need to see the error log file.

Can anyone help?

Thanks
 

WoodenToys.ie

New Member
Thanks for the reply.

I don't have shell access... thus the problem... the only way I have of debugging this script is by cron jobbing a shell script and trying to echo debug statements to a log file... but I can't open the log file that's being generated.

Edit: One more thing I should add is that two files are actually being written, both with the same name but both with different file sizes. I can't open either of them. Anyone have any idea what is going on?
 

WoodenToys.ie

New Member
Issue resolved.

The issue was that I was using Windows explorer to upload the script and it wasn't using ASCII mode. A filezilla transfer did the trick.

The resulting DOS line breaks were messing up the script, and resulted in non-printable characters in the file names, thus the duplicate files that I couldn't open.
 
Status
Not open for further replies.
Top