X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=2.4 required=5.0 	tests=AWL,BAYES_00,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <26617039.post@talk.nabble.com>
Date: Wed, 2 Dec 2009 13:47:00 -0800 (PST)
From: Almo <almo2001@yahoo.com>
To: cygwin@cygwin.com
Subject: Problem with bash script running under NT AUTHORITY\SYSTEM
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


Hi!

I'm using cygwin and this command in a function works when I'm logged in as
me:

gzip -f ./$1.sql 2>> error.log

so it zips hyperquest_v2.sql as the argument I send it is "hyperquest_v2".

When this is run from NT AUTHORITY\SYSTEM as a scheduled task, I get an
error. So I put in some debug output: (I also have to specify where gzip.exe
is so that account can find it, hence the "/usr/bin/" part)

echo "/usr/bin/gzip -f ./$1.sql 2>> error.log" >> error.log
usr/bin/gzip -f ./$1.sql 2>> error.log

The output I get is:

hyperquest_v2.sql
/usr/bin/gzip -f ./hyperquest_v2.sql 2>> error.log
usr/bin/gzip: No such file or directory

Usually, if the file doesn't exist, you get

gzip blarg.txt
gzip: blarg.txt: No such file or directory

So... it's like it's not getting any arguments, even though the echo shows
it should be!!!!

Also, if it weren't finding gzip.exe, it would say "command not found"
instead of "no such file or directory".

I really hope this isn't some n00b mistake, but I've been hunting around for
a few hours now with no luck. :(
-- 
View this message in context: http://old.nabble.com/Problem-with-bash-script-running-under-NT-AUTHORITY%5CSYSTEM-tp26617039p26617039.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

