Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [65.193.99.4] From: "Buck Turgidson" To: Subject: Script Doesn't Work Correctly with Cron Date: Thu, 12 Dec 2002 13:07:51 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 12 Dec 2002 18:07:17.0324 (UTC) FILETIME=[4E61E8C0:01C2A209] I have a script that works when I run it from the command line, but when it is executed with cron, it produces a null file. I am sure that cron is executing it because it creates the file. It is just not populated. Here is the script. I want to query an Oracle database every couple of minutes, capture some data, and append it to a flat file. I want to keep 2000 lines in the flat file. Can someone spot the error? Again, it works run from the command line. #!/bin/bash sqlplus -s scott AT mydb < up @ss.sql | grep -v "Enter password:" >> monsql.lst tail -2000 monsql.lst > montemp.lst rm -f monsql.lst mv montemp.lst monsql.lst -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/