clarify "why doesn't my shell script work"

This commit is contained in:
David Starks-Browning 2002-01-23 22:35:58 +00:00
parent 3c07fbebf8
commit c9399dd5d7
1 changed files with 5 additions and 3 deletions

View File

@ -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