assign a string variable onto itself with concat ksh
- From: "theshowmecanuck" <theshowmecanuck@xxxxxxxxx>
- Date: 27 Sep 2006 18:57:19 -0700
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"
As you might guess (or know outright! :-) my idea doesn't work. At
the end $optString still equals "r", not "ro". Can someone help me out
with something that works. (I have tried sed and awk as well, but
likely as not, I am not getting the syntax correct... just to let you
know I tried and am now pulling my hair out.)
TIA
BillR
.
- Follow-Ups:
- Re: assign a string variable onto itself with concat ksh
- From: Barry Margolin
- Re: assign a string variable onto itself with concat ksh
- From: Bruce Barnett
- Re: assign a string variable onto itself with concat ksh
- From: Bill Marcum
- Re: assign a string variable onto itself with concat ksh
- Prev by Date: duplicate entries - compare files
- Next by Date: Re: assign a string variable onto itself with concat ksh
- Previous by thread: duplicate entries - compare files
- Next by thread: Re: assign a string variable onto itself with concat ksh
- Index(es):
Relevant Pages
|