| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| 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" <jc_va AT hotmail DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | Script Doesn't Work Correctly with Cron |
| Date: | Thu, 12 Dec 2002 13:07:51 -0500 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
| Message-ID: | <BAY1-DAV340xEKNPsk200006610@hotmail.com> |
| 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |