Madhuker Sinha
Answered On : Jul 20th, 2006
For concatenating two string we use cat command.
Ex:- cat str1 str2
Login to rate this answer.
Mukund
Answered On : Aug 1st, 2006
echo $var1 $var2
Login to rate this answer.
cat $str1 $str2 is WRONG - cat command will need file names as input
Login to rate this answer.
Asha Sonani
Answered On : Aug 25th, 2006
var1=$var1$var2
echo $var1
Login to rate this answer.
Ramya Murthy
Answered On : Nov 2nd, 2006
you can concatenate two strings by using the echop command..echo -e -n str1; echo str2 | cat
Login to rate this answer.
Variable1="Open"
Variable2="Systems"
Variable3=$Variable1$Variable2
echo $Variable3
-- Output OpenSystems

1 User has rated as useful.
Login to rate this answer.
There are two different ways to do the same.
1.
var1 = "first"
var2 = "second"
var3 = $var1$var2
The only problem with the above solution is you can not attach the general text at hte end or in between of the text to create new string as variable which is not present so it will give an error.
BEST SOLUTION IS:
2.
var1 = "first"
var2 = "second"
var3 = ${var1}$var2
This will also work. In addtion to this, if you want to add some general text, you can add.
ex. var3 = $var1${var2}thisistestadddition
the var3 will be firstsecondthisistestadddition
Login to rate this answer.