OpenSolaris

Printable Version Enter a New Search
Bug ID 1191119
Synopsis *csh* : can't use the set command for variable larger than 21 characters in csh
State 10-Fix Delivered (Fix available in build)
Category:Subcategory shell:cshell
Keywords *csh* | 21 | can't | character | characters | command | csh | environmen | set | than | variable
Responsible Engineer Jon Bowman
Reported Against 2.4 , 5.4 , 5.5 , 5.8 , 5.9 , 4.1.3 , 5.5.1 , no-v4 , s1093 , s494_fcs , 4.1.1psra , solaris_7 , solaris_9 , sol2.3_edii , platform_unrel
Duplicate Of
Introduced In solaris_2.0
Commit to Fix snv_33
Fixed In snv_33
Release Fixed solaris_nevada(snv_33)
Related Bugs 1170167 , 1179314 , 1255977 , 6375229 , 4737436 , 4770491 , 6416734
Submit Date 7-February-1995
Last Update Date 8-February-2006
Description
I had the customer try to use set variable in csh and get error;
set: Variable name too long. 
I tried it also and get the same problem. The customer also has patch 102024(csh) and 
101945 jumbo kernel patch and still have problem.
Able to exceed 21 characters in 2.3.
[ 08:47:45, 2.Feb.95 TANDERSON ]

The description field as copied from bug report 1255977 follows:

In a C-shell, I did

% setenv THIS_IS_A_LONG_ENVIRONMENTAL_VARIABLE_TEST yes
% env
...
THIS_IS_A_LONG_ENVIRONMENTAL_VARIABLE_TEST=yes

Then I tried

%echo $THIS_IS_A_LONG_ENVIRONMENTAL_VARIABLE_TEST
Variable name too long

I also tried

% if ( "$THIS_IS_A_LONG_ENVIRONMENTAL_VRIABLE_TEST" == "yes") then
Variable name too long

Even though the variable is set successfully, it cannot be used in a cshell script. Customers
complain about this. HP had similar problem, but has provided a patch for their systems.

The description field as copied from bug report 1179314 follows:

customer has an application that requires them to set environment varaibles to
24 characters.

ie
# csh
# setenv NEED_TO_HAVE_AREALLY_FIX 1
# echo $NEED_TO_HAVE_AREALLY_FIX
Variable name too long
---------------------------------------------

The description field as copied from bug report 1190088 follows:

The man page of csh says :
     
A variable name consists of up to 20 letters and digits, and starts with a  
letter  (the underscore is considered a letter).

The customer wants to have variables up to 1010 char long in their csh
script.

The description field as copied from bug report 1164134 follows:

under the customer's behalf:

when using the following c-shell script file:
------------------
setenv XUSERFILESEARCHPATH /tmp
setenv XUSERFILESEARCHPATH ${XUSERFILESEARCHPATH}:/home/tmp
------------------

cust receives the following error message:
       XUSERFILESEARCHPAT: Undefined variable

which indicates that the original variable name was truncated to 18 characters. 

The request is to make c-shell able to handle variable names of 25 or more characters.
Work Around

The work around field as copied from bug report 1255977 follows:

use a shorter variable name.
Comments
N/A