www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SARE_SPEC_REPLICA_OBFU,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Date: | Tue, 7 Dec 2010 14:10:48 -0700 |
Message-ID: | <AANLkTimKcDFUT7CS8xTaq4Qy6P9w8HVAO7J8U_Q96cg0@mail.gmail.com> |
Subject: | du -ks output different when run from command and when run on scheduled task |
From: | computer tech <comphandyman AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
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 |
Greetings all I have run this set of commands directly from the cygwin command line. du -ks //comp/shares/ Ouput1: is correct 49939594 //comp/shares/ When I put the script in a bash script(file1.sh) and run from cygwin command line, it works fine also(output1 is generated), it is only when the file runs as a schedule task that if gives the wrong ouput(output2) For clarity sake here is what the file looks like. #!/usr/bin/bash OUT=/cygdrive/c/logs echo `date` >> $OUT/size-new.txt du -ks //comp/shares/ >> $OUT/size-new.txt The bat. file that schedules the bash script looks like this. The scheduled task runs at night and it works , it just outputs the wrong number. @echo off C:\cygwin\bin\bash.exe --login -c "/home/rod/Shop-fs2.sh" Output2: when script runs from scheduled tasks ; It just gives a 4, when the output is way more then 4. 4 //s550-shop/shares/replica/Administration I am running win xp, sp3. And I am really confused. Why would script generate proper output when it is run from command line and not when run from scheduled tasks. Thank you all for your help, Rigo -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |