can we make a global variable and store character values and add other values to that variable ?? for example
a="hello, John"
and can we add value ". How are you? so
a can have
"hello, John. How are you?"
can someone help me??
can we make a global variable and store character values and add other values to that variable ?? for example
a="hello, John"
and can we add value ". How are you? so
a can have
"hello, John. How are you?"
can someone help me??
$ a="hello, John" a="$a. How are you?"
$ echo "$a"
hello, John. How are you?
Recent shells support even:
% a="hello, John" a+=". How are you?"
% echo "$a"
hello, John. How are you?
To make the variable global, use export <variable name>.