The method export vname=value will override the original value. I want a way to append to the old value by colon.
export vname=value
Any idea how? Thanks.
Try this:
export vname=${vname}:appendedtext
Demo:
$ export foo=bar $ echo $foo bar $ export foo=${foo}:baz $ echo $foo bar:baz
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
By posting your answer, you agree to the privacy policy and terms of service.
tagged
asked
5 months ago
viewed
37 times
active