1

The method export vname=value will override the original value. I want a way to append to the old value by colon.

Any idea how? Thanks.

2

Try this:

export vname=${vname}:appendedtext

Demo:

$ export foo=bar
$ echo $foo
bar
$ export foo=${foo}:baz
$ echo $foo
bar:baz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.