Unix Technical Forum

tcsh and setenv: Solaris 8 to Solaris 10

This is a discussion on tcsh and setenv: Solaris 8 to Solaris 10 within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> The version of tcsh in Solaris 10 is newer than that in 8 (8 is 6.10.00, 10 is 6.12.00), ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 11:06 AM
Tim Bradshaw
 
Posts: n/a
Default tcsh and setenv: Solaris 8 to Solaris 10

The version of tcsh in Solaris 10 is newer than that in 8 (8 is
6.10.00, 10 is 6.12.00), and, it turns out, subtly incompatible: setenv
in 6.10.00 allows hyphens in variable names, but in 6.12.00 it doesn't.
And lo, we have environment variable names with hyphens, buried in
some vast tangled mass of vendor code.

Tragically, clubbing the people who wrote these scripts to death is not
an option (they're in a different country and arranging extradition etc
would take ages).

Does anyone know if there is any compatibility thing I can set to make
it work the way it did in 8 (yes, I've looked, and I can't find one)?

Thanks

--tim

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 11:07 AM
AHinMaine
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10



On Dec 18, 10:19 am, "Tim Bradshaw" <tfb+goo...@tfeb.org> wrote:
> The version of tcsh in Solaris 10 is newer than that in 8 (8 is
> 6.10.00, 10 is 6.12.00), and, it turns out, subtly incompatible: setenv
> in 6.10.00 allows hyphens in variable names, but in 6.12.00 it doesn't.
> And lo, we have environment variable names with hyphens, buried in
> some vast tangled mass of vendor code.
>
> Tragically, clubbing the people who wrote these scripts to death is not
> an option (they're in a different country and arranging extradition etc
> would take ages).
>
> Does anyone know if there is any compatibility thing I can set to make
> it work the way it did in 8 (yes, I've looked, and I can't find one)?
>
> Thanks
>
> --tim


That's definitely strange... I confirmed that hyphens work in 6.11.00
as well, but definitely not 6.12.00. I didn't see anything telling in
the tcsh manpage, so I would probably just compile and install an older
version. I notice that 6.14.00 is available, but I haven't tried it.
ftp://ftp.astron.com/pub/tcsh/

It's not like there's a bunch of files to replace. The SUNWtcsh
package contains nothing more than the tcsh binary, no libs or includes
to worry about.


(1)[1:43pm] # pkginfo -l SUNWtcsh
PKGINST: SUNWtcsh
NAME: Tenex C-shell (tcsh)
CATEGORY: system
ARCH: sparc
VERSION: 11.10.0,REV=2005.01.08.05.16
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
DESC: Tenex C-shell (tcsh) 6.12
PSTAMP: sfw1020050108052314
INSTDATE: Oct 20 2006 16:13
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 3 installed pathnames
2 shared pathnames
2 directories
1 executables
710 blocks used (approx)

(2)[1:43pm] # pkgchk -l SUNWtcsh | grep Pathname:
Pathname: /usr
Pathname: /usr/bin
Pathname: /usr/bin/tcsh

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 11:07 AM
AHinMaine
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10



On Dec 18, 10:19 am, "Tim Bradshaw" <tfb+goo...@tfeb.org> wrote:
> The version of tcsh in Solaris 10 is newer than that in 8 (8 is
> 6.10.00, 10 is 6.12.00), and, it turns out, subtly incompatible: setenv
> in 6.10.00 allows hyphens in variable names, but in 6.12.00 it doesn't.
> And lo, we have environment variable names with hyphens, buried in
> some vast tangled mass of vendor code.
>
> Tragically, clubbing the people who wrote these scripts to death is not
> an option (they're in a different country and arranging extradition etc
> would take ages).
>
> Does anyone know if there is any compatibility thing I can set to make
> it work the way it did in 8 (yes, I've looked, and I can't find one)?
>
> Thanks
>
> --tim




Actually, scratch that last. I just tried 6.14.00 and it worked fine.

(3)[6:56pm] > echo $version
tcsh 6.14.00 (Astron) 2005-03-25 (i386-sun-solaris) options
wide,nls,dl,al,kan,rh,color,filec
(4)[6:56pm] > setenv FOO-BAR "BAZ"
(5)[6:56pm] > printenv FOO-BAR
BAZ


So just upgrade and you should be all set.

--
Andy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 11:07 AM
Casper H.S. Dik
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10

"AHinMaine" <aharrison@gmail.com> writes:

>That's definitely strange... I confirmed that hyphens work in 6.11.00
>as well, but definitely not 6.12.00. I didn't see anything telling in
>the tcsh manpage, so I would probably just compile and install an older
>version. I notice that 6.14.00 is available, but I haven't tried it.
>ftp://ftp.astron.com/pub/tcsh/


The problem is that they don't work in most shells because the "-"
is reserved for other purposes (they cannot be made to work in
Bourne shells and descendants, e.g.,)


Of course, if all you need to do is run programs which those variables
set, you can wrap them with env:


env FOO-BAR=gobbledigook program arg ...

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 11:07 AM
Tim Bradshaw
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10

On 2006-12-18 19:00:10 +0000, Casper H.S. Dik <Casper.Dik@Sun.COM> said:
>
> Of course, if all you need to do is run programs which those variables
> set, you can wrap them with env:



No, unfortunately what I need to do is make a huge mass of
vendor-written tcsh scripts work.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 11:07 AM
Tim Bradshaw
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10

Casper H.S. Dik wrote:

> The problem is that they don't work in most shells because the "-"
> is reserved for other purposes (they cannot be made to work in
> Bourne shells and descendants, e.g.,)


If anyone cares about this I did a bit of research.

It looks as if Sun build a pretty much unmodified 6.12.00 (this is
certainly the case for the sources at opensolaris.org).

Looking at the sources at tcsh.org, a check to setenv was put in just
before 6.12.00 and was taken out shortly afterwards (before 6.13
anyway). So, yes, 6.14.00 doesn't have it.

Various Linux boxes *report* the version as 6.12.00 but do not have the
check. I assume they are basically lying about the version: they're
not reporting changes from the distribution which they've made.

csh does not appear to ever have had this check:
setenv 'really=odd-name' 3
works (for some definition of "works").

It would be nice if Sun moved to 6.14.00, at least from our
perspective. I imagine it's a fairly low priority though - how many
people use tcsh (or any csh) any more? I hadn't for at least 15 years
until starting my current contract.

--tim

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 11:07 AM
Casper H.S. Dik
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10

"Tim Bradshaw" <tfb+google@tfeb.org> writes:

>It would be nice if Sun moved to 6.14.00, at least from our
>perspective. I imagine it's a fairly low priority though - how many
>people use tcsh (or any csh) any more? I hadn't for at least 15 years
>until starting my current contract.


Yes, we should probably do this.

I'm a tcsh user myself (I've always much preferred tcsh's command
line completion then any of the other shells)

Casper
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 11:07 AM
Marc
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10

"Tim Bradshaw" wrote:

> It would be nice if Sun moved to 6.14.00, at least from our
> perspective. I imagine it's a fairly low priority though - how many
> people use tcsh (or any csh) any more? I hadn't for at least 15 years
> until starting my current contract.


One reason I heard for not moving yet is that it takes time to check that
the change does not break too many interfaces. If you can show a case
where the change actually *repairs* an incompatibility with older
versions, it might help (or not).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 11:07 AM
Tim Bradshaw
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10

Marc wrote:

>
> One reason I heard for not moving yet is that it takes time to check that
> the change does not break too many interfaces. If you can show a case
> where the change actually *repairs* an incompatibility with older
> versions, it might help (or not).


Yes, of course. I wasn't hassling Sun to break stuff. The original
article is an example where a change to the current version would fix
something that broke between Solaris 8 & 10 (have not checked 9, we
don't have any 9 boxes).

I'm not sure how I'd file such a request with Sun anymore though.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 11:07 AM
AHinMaine
 
Posts: n/a
Default Re: tcsh and setenv: Solaris 8 to Solaris 10



On Dec 21, 7:36 am, "Tim Bradshaw" <tfb+goo...@tfeb.org> wrote:
> It would be nice if Sun moved to 6.14.00, at least from our
> perspective. I imagine it's a fairly low priority though - how many
> people use tcsh (or any csh) any more? I hadn't for at least 15 years
> until starting my current contract.


I've been using it since at least 93 or 94. I've been building on the
same .tcshrc config file since then. My collective .tcshrc files are
around 80K. I copy the same ones around to all my servers. I have a
few common ones that are sourced, plus one each for every o/s that I
use. And I can't even function without vi keys on the command line.


--
Andy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:38 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com