Max size of variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Max size of variable
# 1  
Old 09-27-2002
Data Max size of variable

What is the maximum amount of characters that you can have in a varible name in the ksh shell?
# 2  
Old 09-27-2002
ksh dynamically allocates space for variable names and does not impose a limit on the length of a name. There is a limit on the maximum length of an input line and this will indirectly impose a limit on variable name length. Your version of ksh should guarantee that it can handle a command line of at least LINE_MAX length. Your value for LINE_MAX may be on a limits man page.

I just test a script that uses a 1067 character variable and it works. I set it to zero and I echoed the value. But since my LINE_MAX is 2048, I could not echo it twice in one echo statement. Nor could I add 1 to its value.

Good programming technique will dictate much smaller variable sizes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Max size directory

Hi I know that a perticular direxctory is cosuming max space . Filesystem 1K-blocks Used Available Use% Mounted on nfsfi02:/vol/fivol2/Dir2/dir 104857600 92671400 12186200 89% /fs/dir I want to know which sub directory is consuming max... (4 Replies)
Discussion started by: ptappeta
4 Replies

2. Shell Programming and Scripting

finding max size

Hi I have a list of 2000 records with multiple entries and I want to get the max size for each entry ABC 1 ABC 2 ABC 3 ABC 4 DEF 1 DEF 2 DEF 2 DEF 2 DEF 2 ... (9 Replies)
Discussion started by: Diya123
9 Replies

3. UNIX for Dummies Questions & Answers

Restrict Max file size

Hello All, I am working on an issue, where I need to check the max file size of a file. If the file size exceeds 2 GB, then I need to generate an error message. Since the file system does not allow a file to be created larger than 2 GB, I am planning to use named pipes & AWK file to acheive my... (6 Replies)
Discussion started by: puru2121
6 Replies

4. UNIX for Advanced & Expert Users

Max size of the attachment

Hi Gurus, I am unable to send a file which size is more than 10mb through the "sendmail" command in unix. I searched from internet and followed the path specified over there "/etc/mail/sendmail.cf" and too "/etc/mail/main.cf" but found in those files below lines. # maximum message size... (1 Reply)
Discussion started by: sanjay.login
1 Replies

5. Solaris

Help size Netra T5220 to MAX

I have a new Netra T5220 that came preinstalled OS 10. The purpose is to be a backup server to store images of other Server Blades. There are three systems that will be storing their backups. Per engineering documents and with the vendor system it is determined that we needed somewhere around 300... (3 Replies)
Discussion started by: udubya
3 Replies

6. UNIX for Advanced & Expert Users

Max. file size

i want to know what is the maximum file size supported by linux with ext3 file system. (1 Reply)
Discussion started by: nagalenoj
1 Replies

7. Solaris

max. size of file

I wants to ask that what is the max size of file that we can create in the unix file system. (2 Replies)
Discussion started by: sameerghogre
2 Replies

8. AIX

max size of a volum group with 5.3

hello i would like to create a volume group with 2200 Go (with pp size= 64) it is possible, or it is too big ? thank you (2 Replies)
Discussion started by: pascalbout
2 Replies

9. Programming

Max file size can't exceed 2 GB

We have Sun OS 5.9 we are doing a backup process (ProC program) that uses the function... fprintf(fp,"%s;%s;%s;%s;%s;%ld;%ld;%ld;%ld;%s;%s;%s;%d;%s;%s;%s;%ld;%s;%s;%s;%ld;%ld;%s;%ld;%s;%ld;%s;%s;%c%c",x_contrno, x_subno, x_b_subno,x_transdate,x_last_traffic_date,BillAmt_s, x_billamount_int,... (10 Replies)
Discussion started by: atiato
10 Replies

10. UNIX for Dummies Questions & Answers

Max I/O Size

My HP-UX 11.0 system is supporting an Oracle database. I have found a number of references on the Net to the "Max I/O size" in relation to setting Oracle parameters. How can I tell what my max i/o size is? I originally made the assumption that it was referring to my stripe size but now I think... (1 Reply)
Discussion started by: keelba
1 Replies
Login or Register to Ask a Question