Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » Homework HelpRSS Feeds

Write a shell program to concatinate two strings and find the length of the resultent string

Posted By: Joseph Evans     Category: Unix / Linux / Ubuntu     Views: 7676

Write a shell program to concatinate two strings and
find the length of the resultent string

Code for Write a shell program to concatinate two strings and find the length of the resultent string in Unix / Linux / Ubuntu

echo Enter first string:
read s1
echo Enter second string:
read s2
s3=$s1$s2
len=`echo $s3 | wc -c`
len=`expr $len - 1`
echo Concatinated stringis $s3 of length $len 
  
Share: 



Joseph Evans
Joseph Evans author of Write a shell program to concatinate two strings and find the length of the resultent string is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!