This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with bash script running under NT AUTHORITY\SYSTEM


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]