Re: starting xterm from tcsh, gives error message: missing }.

2005-04-19 Thread Alexander Gottwald
On Mon, 18 Apr 2005, Bengt Svensson wrote:

 Thanks Michael for the answer, you were correct.
 It was a problem with spaces in the PATH. It is the script 
 /etc/profile.d/00xorg-x11-base.csh that does not handle the space. I 
 verified this by removing the part of the PAT that had the space in it. 
 The script is attached here in its original form. Hopefully someone who is 
 better than me at csh scripting can find a solution for future versions 
 of cygwin.

I have space in the path too and had no problems with the xorg-x11-base.csh 
script. maybe it is a different script which is not installed on my but on
your host.

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: starting xterm from tcsh, gives error message: missing }.

2005-04-18 Thread Bengt Svensson
Thanks Michael for the answer, you were correct.
It was a problem with spaces in the PATH. It is the script 
/etc/profile.d/00xorg-x11-base.csh that does not handle the space. I 
verified this by removing the part of the PAT that had the space in it. 
The script is attached here in its original form. Hopefully someone who is 
better than me at csh scripting can find a solution for future versions 
of cygwin.

Bengt Svensson
$ more 00xorg-x11-base.csh
# The script name starts with 00 to ensure that it is executed before any
# other scripts because one of them may need to know where X is to run
# properly.
# Check if the PATH variable is empty or not
if ( $?PATH ) then
  # PATH is not empty
  # Check if path is already in PATH
  eval /bin/echo ${PATH} | /bin/grep -q /usr/X11R6/bin
  if ( $status ) then
# Path is not already in PATH, prepend it to PATH
setenv PATH /usr/X11R6/bin:${PATH}
  endif
else
  # PATH is empty
  setenv PATH /usr/X11R6/bin
endif

On Fri, 2005-04-15 at 19:21 -0500, Bengt Svensson wrote:
 I am using tcsh in cygwin and every time I start a new xterm from an existing
 xterm/tcsh window I get the error message 'missing }.'
 I recently updated my cygwin so everything should be current. But see attached
 cygcheck -s -v -r output.
You haven't given enough context in that script to determine why that
line was problematic and I don't have a Cygwin install in front of me,
so I can't check.
To me that line looks fine as it was, however the purpose of the eval
was not obvious.  I think that statement would be better without the
eval at all.
I notice that one directory in your PATH contains a space (c:\Program
Files\Common Files\MDL Shared\ISIS).  If you examine your output from
cygcheck you will see that something weird is happening.
My guess is that at least one script in profile.d isn't handling
directories with spaces properly.  They really should be rewritten to
use the $path variable instead ($path is an array, $PATH is a scalar) or
to explicitly set IFS and use proper quoting.
--
Michael Wardle [EMAIL PROTECTED]



Re: starting xterm from tcsh, gives error message: missing }.

2005-04-15 Thread Michael Wardle
On Fri, 2005-04-15 at 19:21 -0500, Bengt Svensson wrote:
 I am using tcsh in cygwin and every time I start a new xterm from an existing 
 xterm/tcsh window I get the error message 'missing }.'
 I recently updated my cygwin so everything should be current. But see 
 attached 
 cygcheck -s -v -r output.

You haven't given enough context in that script to determine why that
line was problematic and I don't have a Cygwin install in front of me,
so I can't check.

To me that line looks fine as it was, however the purpose of the eval
was not obvious.  I think that statement would be better without the
eval at all.

I notice that one directory in your PATH contains a space (c:\Program
Files\Common Files\MDL Shared\ISIS).  If you examine your output from
cygcheck you will see that something weird is happening.

My guess is that at least one script in profile.d isn't handling
directories with spaces properly.  They really should be rewritten to
use the $path variable instead ($path is an array, $PATH is a scalar) or
to explicitly set IFS and use proper quoting.

-- 
Michael Wardle [EMAIL PROTECTED]