Max size of variable

What is the maximum amount of characters that you can have in a varible name in the ksh shell?

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.