Re: assign a string variable onto itself with concat ksh
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 09:03:58 -0400
In article <1159408639.704728.268900@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"theshowmecanuck" <theshowmecanuck@xxxxxxxxx> wrote:
Hi,
In a ksh script I would like to assign a string back onto itself
while concatenating another string to it... something like this:
optString="$optString$newString"
I have a string variable: $optString that has the value "r"
I then get another string variable: $newString that has a value of "o"
I would like to end up with optString having a value of "ro"
Works fine for me:
barmar $ optstring=r
barmar $ newstring=o
barmar $ optstring="$optstring$newstring"
barmar $ echo $optstring
ro
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- References:
- assign a string variable onto itself with concat ksh
- From: theshowmecanuck
- assign a string variable onto itself with concat ksh
- Prev by Date: Re: Changing UnixID
- Next by Date: tcsh bug
- Previous by thread: Re: assign a string variable onto itself with concat ksh
- Next by thread: tcsh bug
- Index(es):
Relevant Pages
|