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: Subject: du -ks output different when run from command and when run on scheduled task From: computer tech To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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