www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/02/16:47:10

X-Recipient: archive-cygwin AT delorie DOT 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 AT yahoo DOT com>
To: cygwin AT cygwin DOT com
Subject: Problem with bash script running under NT AUTHORITY\SYSTEM
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019