Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 30 Jul 2003 07:29:57 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: =?iso-8859-1?q?philippe=20guillaume?= cc: cygwin AT cygwin DOT com Subject: Re: And now a problem with tcl In-Reply-To: <20030730074652.80028.qmail@web9905.mail.yahoo.com> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII No, that's not what I said. You can call *any* script (by specifying a full path to it), but be aware of two things: 1) tcl will not understand POSIX paths, so you have to use Win32 paths, and 2) Windows doesn't treat shell scripts as executable, so you have to use 'sh' to move over to the Cygwin world (which will, incidentally, understand POSIX paths). For example, you can call *any* program (or batch file) directly by specifying a full Win32 path to it (e.g., 'c:\cygwin\home\foo\prog.exe'). However, if you call a script (with a '#!' magic) instead, Windows won't know what to do with it, so you have to call a shell (e.g., 'sh') to interpret the invocation (e.g., 'sh /home/foo/prog.pl'). In both cases, the program or script doesn't have to be in the path, as long as you provide a full path to the script. In the first case (direct call) it's a Win32 path, and in the second (call through shell) it's a POSIX path. Igor On Wed, 30 Jul 2003, philippe guillaume wrote: > So i can't call a script whose directory is not in the > path ...? > Damned !!! > ;) > > Thanks a lot Igor > --- Igor Pechtchanski a crit : > > On Tue, 29 Jul 2003, philippe guillaume wrote: > > > > > I've been searching for a long time about this > > > problem. > > > The command runs normally on Unix but not on Cygwin :( > > > > > > The problem concerns a command button which runs a > > > sh-script ... > > > Here is the syntax : > > > > > > button .frPrincipal.thug\ > > > -activebackground "#beccbe" \ > > > -background "#d2e0d2" \ > > > -command {exec scriptsh &} \ > > > -cursor {hand1} \ > > > -font $font \ > > > -height {2} \ > > > -text {run scriptsh} \ > > > -width {22} > > > > > > The directory containing the scriptsh file is defined > > > in the PATH both on Cygwin and Unix. > > > But it runs on Unix and not on Cygwin. > > > Actually, i must type "exec sh /home/.../scriptsh" to > > > run it ... > > > > > > So please, what can i do solve this problem ? > > > > IIRC, tcl doesn't understand POSIX paths. So, your solution (exec sh > > ...) is correct (you could also most likely omit the full path from > > scriptsh, i.e, use "exec sh scriptsh", provided scriptsh *is* in the > > PATH). > > Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/