GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Operating System  >  Unix Commands
Go To First  |  Previous Question  |  Next Question 
 Unix Commands  |  Question 72 of 73    Print  
How to concatenate two strings in UNIX
Please give me in detail the command for concatenating two strings in UNIX


  
Total Answers and Comments: 4 Last Update: September 06, 2009     Asked by: arunaresh 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: rahulashu
 
char1="rahul"
char2="chavan"

char3=$char1$char2

it  concatinate a  string in unix.

Above answer was rated as good by the following members:
UncaAlby, Markerhell
June 10, 2008 02:30:08   #1  
rahulashu Member Since: June 2008   Contribution: 4    

RE: How to concatenate two strings in UNIX
char1 "rahul"
char2 "chavan"

char3 $char1$char2

it concatinate a string in unix.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 12, 2008 07:55:05   #2  
rayudumca_9 Member Since: August 2008   Contribution: 1    

RE: How to concatenate two strings in UNIX
Pipe symbol between two strings.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
November 27, 2008 20:52:39   #3  
vnadipat Member Since: November 2008   Contribution: 3    

RE: How to concatenate two strings in UNIX
str1 abcdef
str2 ghijklm
echo ${str1}$str2 or
echo ${str1}ghijklm

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 06, 2009 08:40:14   #4  
goksn Member Since: May 2009   Contribution: 94    

RE: How to concatenate two strings in UNIX
var1 abc
var2 cde
var3 ${var1}${var2}
echo $var3

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape