public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Buck Turgidson" <jc_va@hotmail.com>
To: <cygwin@cygwin.com>
Subject: Script Doesn't Work Correctly with Cron
Date: Thu, 12 Dec 2002 10:29:00 -0000	[thread overview]
Message-ID: <BAY1-DAV340xEKNPsk200006610@hotmail.com> (raw)

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@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/

             reply	other threads:[~2002-12-12 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-12 10:29 Buck Turgidson [this message]
2002-12-12 10:53 ` Igor Pechtchanski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY1-DAV340xEKNPsk200006610@hotmail.com \
    --to=jc_va@hotmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).