public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Scripts starting with colon
@ 1999-09-16  3:52 Keith Starsmeare
  1999-09-30 23:42 ` Keith Starsmeare
  0 siblings, 1 reply; 2+ messages in thread
From: Keith Starsmeare @ 1999-09-16  3:52 UTC (permalink / raw)
  To: cygwin

Why do scripts have to start with #! to be recognised as executable?
Scripts can start with just : to mean that it's either a bourne shell
script or a bash script depending on what shell you execute the script
from.

Was this an intentional ommission?

There are scripts in the cygwin installation that start with a colon,
for example gzexe, but the next line is #!/bin/sh and these files are
recognised as being executable.

It seems to be the case with cygwin that a file (with UNIX style end of
line characters) that starts with

:
#!

is the equivalent of a file that starts

#!/bin/sh

how confusing.

Could this matter be fixed (or added to a list of bugs - possibly
mentioned in the FAQ), or is it not considered a bug?

Keith

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Scripts starting with colon
  1999-09-16  3:52 Scripts starting with colon Keith Starsmeare
@ 1999-09-30 23:42 ` Keith Starsmeare
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Starsmeare @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

Why do scripts have to start with #! to be recognised as executable?
Scripts can start with just : to mean that it's either a bourne shell
script or a bash script depending on what shell you execute the script
from.

Was this an intentional ommission?

There are scripts in the cygwin installation that start with a colon,
for example gzexe, but the next line is #!/bin/sh and these files are
recognised as being executable.

It seems to be the case with cygwin that a file (with UNIX style end of
line characters) that starts with

:
#!

is the equivalent of a file that starts

#!/bin/sh

how confusing.

Could this matter be fixed (or added to a list of bugs - possibly
mentioned in the FAQ), or is it not considered a bug?

Keith

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-09-30 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-16  3:52 Scripts starting with colon Keith Starsmeare
1999-09-30 23:42 ` Keith Starsmeare

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).