public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: bash: ./myscript: No such file or directory. TMP variable is  being unset
@ 2000-09-28 13:55 Markus Hoenicka
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Hoenicka @ 2000-09-28 13:55 UTC (permalink / raw)
  To: cygwin

look at /etc/profile:

unset DOSDRIVE
unset DOSDIR
unset TMPDIR
unset TMP

change this to your needs.

regards,
Markus

 > 2.)
 > I have the environment variable "TMP" defined as both a SYSTEM and USER environment
 > variable, but when I open up a Cygwin window it does not have this set.
 > It has all the other ones set, why did it unset this?
 > 
 > 
 > Guy Moore
 > OpenMarket

-- 
Markus Hoenicka, PhD
UT Houston Medical School
Dept. of Integrative Biology and Pharmacology
6431 Fannin MSB4.114
Houston, TX 77030
(713) 500-6313, -7477
(713) 500-7444 (fax)
Markus.Hoenicka@uth.tmc.edu
http://ourworld.compuserve.com/homepages/hoenicka_markus/


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

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

* Re: bash: ./myscript: No such file or directory.  TMP variable is being unset
  2000-09-28  9:34 Guy T. Moore Jr.
  2000-09-28 10:03 ` Larry Hall (RFK Partners, Inc)
@ 2000-09-28 10:04 ` Randall R Schulz
  1 sibling, 0 replies; 4+ messages in thread
From: Randall R Schulz @ 2000-09-28 10:04 UTC (permalink / raw)
  To: Guy T. Moore Jr., cygwin; +Cc: perakis, wabraham

Guy,

The fact that some shells fall back to treating files with execute 
permissions and no '#!' line as being suitable for execution by the 
standard system shell is really an artifact of a time long past. I humbly 
submit that you ought to use #! lines in all your "executable" scripts, 
even if they do operate in the way you intend on a bona fide Unix or Linux 
system.

You may have noticed that the synthesized execute permissions under Cygwin 
are keyed off of select file name extensions or the presence of '#!' as the 
first two characters of a file. I'd say Cygwin is bending over backward to 
create this degree of compatibility with Unix (-like) systems. There is 
little alternative since Windows file systems are impoverished as to 
explicit type information and access control attributes (as a Mac user and 
programmer I see file name suffixes as a very poor substitute for file type 
information).

Lastly, a quick (not thorough) check of the options and man page for BASH 
didn't reveal a way to enable the behavior you desire. Perhaps you could 
add such an option.

Randall Schulz
Teknowledge Corp.
Palo Alto, CA USA


At 09:36 AM 09/28/2000 , Guy T. Moore Jr. wrote:
>1.)
>Seems like I should be able to do the following simple shell scripting:
>
>I'm in a Cygwin 1.1.4 window at my C: prompt.
>
>I create a file, called myscript,  with the 1 line of:
>
>      echo "doggie"
>
>I cannot execute this successfully:
>
>$ ./myscript
>bash: ./myscript: No such file or directory.
>
>I can execute myscript succesfully if I add at the top of the
>myscript the line of:
>
>     #!/bin/sh
>
>and I can also execute myscript succesfully if I, preface the command with 
>/bin/sh:
>
>$ /bin/sh myscript
>
>I'd rather get it to work the way it does on Solaris 5.7 in a bourne shell 
>or csh
>without using any work arounds.
>
>This problem is preventing other simple things from working correctly.
>
>Guy Moore


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

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

* Re: bash: ./myscript: No such file or directory.  TMP variable is being  unset
  2000-09-28  9:34 Guy T. Moore Jr.
@ 2000-09-28 10:03 ` Larry Hall (RFK Partners, Inc)
  2000-09-28 10:04 ` Randall R Schulz
  1 sibling, 0 replies; 4+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2000-09-28 10:03 UTC (permalink / raw)
  To: Guy T. Moore Jr., cygwin; +Cc: perakis, wabraham

At 12:36 PM 9/28/2000, Guy T. Moore Jr. wrote:
>1.)
>Seems like I should be able to do the following simple shell scripting:
>
>
>I'm in a Cygwin 1.1.4 window at my C: prompt.
>
>I create a file, called myscript,  with the 1 line of:
>
>      echo "doggie"
>
>
>I cannot execute this successfully:
>
>$ ./myscript
>bash: ./myscript: No such file or directory.
>
>
>
>I can execute myscript succesfully if I add at the top of the
>myscript the line of:
>
>     #!/bin/sh
>
>
>and I can also execute myscript succesfully if I, preface the command with /bin/sh:
>
>$ /bin/sh myscript
>
>
>I'd rather get it to work the way it does on Solaris 5.7 in a bourne shell or csh
>without using any work arounds.
>
>This problem is preventing other simple things from working correctly.


Your scripts aren't "portable", although that's your choice!;-)  If you 
are running on NT-based systems with NTFS file systems, you can set "ntsec"
in your CYGWIN environment variable and then use "chmod +x <file>" (please
read the documentation on how ntsec works though).  Alternatively, you can
use "ntea" on NT-based systems on either NTFS or FAT drives, as long as you
don't mind a large "EA DATA. SF" file in the root of all the FAT drives!;-)
If you use "ntea", you can use chmod as well.  Otherwise, you need to let
Cywgin know this is a script by adding the #!/bin/sh line or invoking it
with the shell.  Those are your current options.



>2.)
>I have the environment variable "TMP" defined as both a SYSTEM and USER environment
>variable, but when I open up a Cygwin window it does not have this set.
>It has all the other ones set, why did it unset this?


Never seen this so I can't help you there...


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


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

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

* bash: ./myscript: No such file or directory.  TMP variable is being unset
@ 2000-09-28  9:34 Guy T. Moore Jr.
  2000-09-28 10:03 ` Larry Hall (RFK Partners, Inc)
  2000-09-28 10:04 ` Randall R Schulz
  0 siblings, 2 replies; 4+ messages in thread
From: Guy T. Moore Jr. @ 2000-09-28  9:34 UTC (permalink / raw)
  To: cygwin; +Cc: perakis, wabraham

1.)
Seems like I should be able to do the following simple shell scripting:


I'm in a Cygwin 1.1.4 window at my C: prompt.

I create a file, called myscript,  with the 1 line of:

     echo "doggie"


I cannot execute this successfully:

$ ./myscript
bash: ./myscript: No such file or directory.



I can execute myscript succesfully if I add at the top of the
myscript the line of:

    #!/bin/sh


and I can also execute myscript succesfully if I, preface the command with /bin/sh:

$ /bin/sh myscript


I'd rather get it to work the way it does on Solaris 5.7 in a bourne shell or csh
without using any work arounds.

This problem is preventing other simple things from working correctly.


2.)
I have the environment variable "TMP" defined as both a SYSTEM and USER environment
variable, but when I open up a Cygwin window it does not have this set.
It has all the other ones set, why did it unset this?


Guy Moore
OpenMarket

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

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

end of thread, other threads:[~2000-09-28 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-28 13:55 bash: ./myscript: No such file or directory. TMP variable is being unset Markus Hoenicka
  -- strict thread matches above, loose matches on Subject: below --
2000-09-28  9:34 Guy T. Moore Jr.
2000-09-28 10:03 ` Larry Hall (RFK Partners, Inc)
2000-09-28 10:04 ` Randall R Schulz

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