From c9399dd5d7b8462a1d8dd0e6537c2faef2540c14 Mon Sep 17 00:00:00 2001 From: David Starks-Browning Date: Wed, 23 Jan 2002 22:35:58 +0000 Subject: [PATCH] clarify "why doesn't my shell script work" --- winsup/doc/how-using.texinfo | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/winsup/doc/how-using.texinfo b/winsup/doc/how-using.texinfo index 94504d05c..c9b9e59f9 100644 --- a/winsup/doc/how-using.texinfo +++ b/winsup/doc/how-using.texinfo @@ -233,17 +233,19 @@ bash$ mkdir -p path/to/new/dir @subsection Why doesn't my shell script work? There are two basic problems you might run into. One is the fact that -/bin/sh is really ash, and is missing some features you might expect in -/bin/sh. For example: +/bin/sh is really ash, and is missing some features you might expect +in /bin/sh, particularly if you are used to /bin/sh actually being +bash (Linux) or ksh (Tru64). For example: @itemize bullet @item No job control @item No getopts +@item No let @item No functions exported @item Must use `.' instead of `source' (true of sh and ksh too, not just ash) @end itemize -Or it could be a permission problem, and Cygwin doesn't understand that +Or, it could be a permission problem, and Cygwin doesn't understand that your script is executable. Because @samp{chmod} may not work (see FAQ entry above), Cygwin must read the contents of files to determine if they are executable. If your script does not start with