This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Calling Cygwin from Dos - problem with sub program
- From: nlian <norliansyah at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 17 Apr 2008 20:58:52 -0700 (PDT)
- Subject: Calling Cygwin from Dos - problem with sub program
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/