* running shell scripts
@ 2002-06-10 2:07 Steven Weiss
2002-06-10 8:53 ` Mathias Gygax
2002-06-10 9:29 ` Larry Hall (RFK Partners, Inc)
0 siblings, 2 replies; 14+ messages in thread
From: Steven Weiss @ 2002-06-10 2:07 UTC (permalink / raw)
To: cygwin
Hi
/Develop/test/bin> chmod 755 work
/Develop/test/bin> ls -l work
-rwxr-xr-x 1 dbadmin Administ 27 Jun 9 20:18 work
/Develop/test/bin> ./work
bash: ./work: No such file or directory
I am trying to running a shell script from an interactive bash session. I
get the following error when running the shell script. It seems to work when
I put the #! /cygwin/bin/bash inside the script. Surely the script should
run with the execute permissions set as they are.
Regards
Steven
----------------------------------------
sweiss@iafrica.com
+27 21 7892985 (h)
+27 827715157 (m)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 2:07 running shell scripts Steven Weiss
@ 2002-06-10 8:53 ` Mathias Gygax
2002-06-10 9:08 ` wayne
2002-06-10 9:29 ` Larry Hall (RFK Partners, Inc)
1 sibling, 1 reply; 14+ messages in thread
From: Mathias Gygax @ 2002-06-10 8:53 UTC (permalink / raw)
To: cygwin
On Mon, Jun 10, 2002 at 10:30:32AM +0200, Steven Weiss wrote:
> Hi
hi there,
> bash: ./work: No such file or directory
>
> I am trying to running a shell script from an interactive bash
> session. I get the following error when running the shell script. It
> seems to work when I put the #! /cygwin/bin/bash inside the script.
> Surely the script should run with the execute permissions set as they
> are.
that's the way it works. the first shee-bang line topmost, is the
associated interpreter. it could be just anything, from a shell script
to awk program.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 8:53 ` Mathias Gygax
@ 2002-06-10 9:08 ` wayne
2002-06-10 11:19 ` Mathias Gygax
0 siblings, 1 reply; 14+ messages in thread
From: wayne @ 2002-06-10 9:08 UTC (permalink / raw)
To: cygwin
Or you could just do bash ./someprogram
On Mon, Jun 10, 2002 at 03:43:34PM +0200, Mathias Gygax wrote:
> On Mon, Jun 10, 2002 at 10:30:32AM +0200, Steven Weiss wrote:
> > Hi
>
> hi there,
>
> > bash: ./work: No such file or directory
> >
> > I am trying to running a shell script from an interactive bash
> > session. I get the following error when running the shell script. It
> > seems to work when I put the #! /cygwin/bin/bash inside the script.
> > Surely the script should run with the execute permissions set as they
> > are.
>
> that's the way it works. the first shee-bang line topmost, is the
> associated interpreter. it could be just anything, from a shell script
> to awk program.
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
--
Slowly and surely the unix crept up on the Nintendo user ...
Wayne Willcox I will not eat green eggs and ham
wayne@reliant.immure.com I will not eat them Sam I Am!!
A wise person makes his own decisions, a weak one obeys public opinion.
-- Chinese proverb
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 9:08 ` wayne
@ 2002-06-10 11:19 ` Mathias Gygax
2002-06-10 11:38 ` David T-G
0 siblings, 1 reply; 14+ messages in thread
From: Mathias Gygax @ 2002-06-10 11:19 UTC (permalink / raw)
To: cygwin
On Mon, Jun 10, 2002 at 09:34:55AM -0500, wayne wrote:
> Or you could just do bash ./someprogram
or just
. someprogram
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 11:19 ` Mathias Gygax
@ 2002-06-10 11:38 ` David T-G
2002-06-10 12:10 ` Mathias Gygax
0 siblings, 1 reply; 14+ messages in thread
From: David T-G @ 2002-06-10 11:38 UTC (permalink / raw)
To: CygWin Users' List
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
Mathias, et al --
...and then Mathias Gygax said...
%
% On Mon, Jun 10, 2002 at 09:34:55AM -0500, wayne wrote:
% > Or you could just do bash ./someprogram
%
% or just
%
% . someprogram
Well, yes, but be careful about that, because you're then running the
script in the context of your shell instead of a subshell. Any env vars
you change will stay changed, and if your shell ends with an exit then
your window will happily close.
HTH & HAND
:-D
--
David T-G * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 11:38 ` David T-G
@ 2002-06-10 12:10 ` Mathias Gygax
2002-06-10 12:51 ` David T-G
0 siblings, 1 reply; 14+ messages in thread
From: Mathias Gygax @ 2002-06-10 12:10 UTC (permalink / raw)
To: CygWin Users' List
On Mon, Jun 10, 2002 at 11:36:46AM -0500, David T-G wrote:
> % . someprogram
>
> Well, yes, but be careful about that, because you're then running the
> script in the context of your shell instead of a subshell. Any env vars
> you change will stay changed, and if your shell ends with an exit then
> your window will happily close.
well, what about
% (. someprogram)
:-D
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 12:10 ` Mathias Gygax
@ 2002-06-10 12:51 ` David T-G
0 siblings, 0 replies; 14+ messages in thread
From: David T-G @ 2002-06-10 12:51 UTC (permalink / raw)
To: CygWin Users' List
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
Mathias --
...and then Mathias Gygax said...
%
% On Mon, Jun 10, 2002 at 11:36:46AM -0500, David T-G wrote:
% > % . someprogram
% >
% > Well, yes, but be careful about that, because you're then running the
...
%
% well, what about
%
% % (. someprogram)
Hmmm... Yep, that sounds good. Two more chars to type, though; it's
getting to be an awful lot of work ;-)
%
% :-D
HAND
:-D
--
David T-G * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2002-06-10 2:07 running shell scripts Steven Weiss
2002-06-10 8:53 ` Mathias Gygax
@ 2002-06-10 9:29 ` Larry Hall (RFK Partners, Inc)
2002-06-10 9:36 ` David T-G
1 sibling, 1 reply; 14+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2002-06-10 9:29 UTC (permalink / raw)
To: Steven Weiss, cygwin
At 04:30 AM 6/10/2002, Steven Weiss wrote:
>Hi
>
>/Develop/test/bin> chmod 755 work
>/Develop/test/bin> ls -l work
>-rwxr-xr-x 1 dbadmin Administ 27 Jun 9 20:18 work
>/Develop/test/bin> ./work
>bash: ./work: No such file or directory
>
>I am trying to running a shell script from an interactive bash session. I
>get the following error when running the shell script. It seems to work when
>I put the #! /cygwin/bin/bash inside the script. Surely the script should
>run with the execute permissions set as they are.
bash is *not* the default shell in Cygwin. /bin/sh is which is ash. Did
you install it and make sure that it's in your path?
BTW, there's nothing wrong with providing the command interpreter as the
first line of the script. Actually, it's highly recommended practice.
Larry Hall lhall@rfk.com
RFK Partners, Inc. http://www.rfk.com
838 Washington Street (508) 893-9779 - RFK Office
Holliston, MA 01746 (508) 893-9889 - FAX
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
@ 2000-02-15 16:01 Earnie Boyd
2000-02-15 16:56 ` Jens Skakkebaek
0 siblings, 1 reply; 14+ messages in thread
From: Earnie Boyd @ 2000-02-15 16:01 UTC (permalink / raw)
To: Bob McGowan, jskakkebaek; +Cc: cygwin
--- Bob McGowan <Robert.McGowan@veritas.com> wrote:
> Jens,
>
> Check the scripts' first line, the #! one. Be sure that it reference
> bash and that the path used is also correct.
> As in: #!/bin/bash
>
> Be sure you have a /bin/bash.exe for the above to work.
Why bash instead of sh? Sh is much more lightweight and faster to invoke!!
That is the reason ash was used for sh.
=====
---
Earnie Boyd: < mailto:earnie_boyd@yahoo.com >
__Cygwin: POSIX on Windows__
Cygwin Newbies: < http://www.freeyellow.com/members5/gw32/index.html >
__Minimalist GNU for Windows__
Mingw32 List: < http://www.egroups.com/group/mingw32 >
Mingw Home: (Coming Soon)
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* running shell scripts
@ 2000-02-15 11:48 Jens Skakkebaek
2000-02-15 12:01 ` Bob McGowan
2000-02-15 12:03 ` John Fortin
0 siblings, 2 replies; 14+ messages in thread
From: Jens Skakkebaek @ 2000-02-15 11:48 UTC (permalink / raw)
To: cygwin
Hi,
I'm trying to run the Postgres database from cygwin and have got the main
database to work.
However, there a number of shell scripts that I cant run. E.g., I get a "no
such file or directory" error when I tried to run some of the scripts. It
prints out the path correctly, so that's not the problem.
Prefixing it with the full path does not help.
Any pointers would be greatly appreciated.
Thanks in advance,
Jens Skakkebaek
jskakkebaek@adomo.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2000-02-15 11:48 Jens Skakkebaek
@ 2000-02-15 12:01 ` Bob McGowan
2000-02-15 12:03 ` John Fortin
1 sibling, 0 replies; 14+ messages in thread
From: Bob McGowan @ 2000-02-15 12:01 UTC (permalink / raw)
To: jskakkebaek; +Cc: cygwin
Jens,
Check the scripts' first line, the #! one. Be sure that it reference
bash and that the path used is also correct.
As in: #!/bin/bash
Be sure you have a /bin/bash.exe for the above to work.
If these are correct, try running one of the scripts using the
following:
bash -x script_name 2>&1 | tee script_dbg.txt
Depending on where the failure happens, you will see various amounts of
output on the screen. It should stop at the point where the problem
exists, hopefully providing a clue about what it is looking for.
Bob
Jens Skakkebaek wrote:
>
> Hi,
>
> I'm trying to run the Postgres database from cygwin and have got the main
> database to work.
> However, there a number of shell scripts that I cant run. E.g., I get a "no
> such file or directory" error when I tried to run some of the scripts. It
> prints out the path correctly, so that's not the problem.
>
> Prefixing it with the full path does not help.
>
> Any pointers would be greatly appreciated.
>
> Thanks in advance,
>
> Jens Skakkebaek
> jskakkebaek@adomo.com
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
--
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: running shell scripts
2000-02-15 11:48 Jens Skakkebaek
2000-02-15 12:01 ` Bob McGowan
@ 2000-02-15 12:03 ` John Fortin
1 sibling, 0 replies; 14+ messages in thread
From: John Fortin @ 2000-02-15 12:03 UTC (permalink / raw)
To: cygwin
> Hi,
>
> I'm trying to run the Postgres database from cygwin and have got the main
> database to work.
> However, there a number of shell scripts that I cant run. E.g., I get a "no
> such file or directory" error when I tried to run some of the scripts. It
> prints out the path correctly, so that's not the problem.
>
> Prefixing it with the full path does not help.
If you post the script and/or show the session output when this happens, you are
much more likely to get
a helpful response.
John Fortin
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2002-06-10 17:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-10 2:07 running shell scripts Steven Weiss
2002-06-10 8:53 ` Mathias Gygax
2002-06-10 9:08 ` wayne
2002-06-10 11:19 ` Mathias Gygax
2002-06-10 11:38 ` David T-G
2002-06-10 12:10 ` Mathias Gygax
2002-06-10 12:51 ` David T-G
2002-06-10 9:29 ` Larry Hall (RFK Partners, Inc)
2002-06-10 9:36 ` David T-G
-- strict thread matches above, loose matches on Subject: below --
2000-02-15 16:01 Earnie Boyd
2000-02-15 16:56 ` Jens Skakkebaek
2000-02-15 11:48 Jens Skakkebaek
2000-02-15 12:01 ` Bob McGowan
2000-02-15 12:03 ` John Fortin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).