Variable length

Hi All,

I have an issue in my script.

Once we fired the script, it will ask for some input to execute further. Inside the script, I'm taking that value into a variable. But it's taking some limited length of input only in a variable. After some limited length, it's not taking the value.

Could anyone let me know how to increase the variable length to max?

Thanks in advance.

Regards,
VRN

How big is your value? Some examples?

my value will be more than 3 lines like below

Sometimes it may be more than 10 lines also.

Pls suggest the way to achieve this..

Thanks in advance.

Regards,
VRN

On max length of variable I'm not sure..but it is definitely depends on machice bits.

I have a another solution for you.

Try to use array.

read -a line;
echo ${a
[*]}

hope above will help to run your script.

Arrays are limited to the size of a variable too.

You can't depend on the size of a variable being any more than 4096 bytes.

There's probably ways to do what you want to do without storing the entire thing in a variable. What is your actual goal here?