| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <16760067.post@talk.nabble.com> |
| Date: | Thu, 17 Apr 2008 20:58:52 -0700 (PDT) |
| From: | nlian <norliansyah AT gmail DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Calling Cygwin from Dos - problem with sub program |
| MIME-Version: | 1.0 |
| X-Nabble-From: | norliansyah AT gmail 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 |
Hi,
I have a bash script (e.g. test.sh), and I have the following command
inside the script:
#!/usr/bin/bash
export PROG_LIB="D:\batch\prod\prog\lib"
export PATH="$PROG_LIB:$PATH"
#include functions from functions.library file
. functions.library
#Using logmsg function:
logmsg "This is the beginning"
====
When I ran from cygwin, I got no error when executing the shell script
(test.sh), all OK.
However when I execute from dos, I got an error:
functions.library: No such file or directory
logmsg: command not found
Here is my dos script, test.cmd:
@echo off
D:
chdir D:\cygwin\bin
bash --login -c '/cygdrive/d/Batch/prod/prog/scripts/test.sh'
Any idea what's missing / went wrong?
Thanks,
Lian
--
View this message in context: http://www.nabble.com/Calling-Cygwin-from-Dos---problem-with-sub-program-tp16760067p16760067.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |