SCRIPT:
#!/bin/bash
echo -n "Enter the 1st string : "
read str1
echo -n "Enter the 2nd string : "
read str2
cat_str="$str1$str2"
echo "cancatenated string : $cat_str"
echo -n "Enter the 1st string : "
read str1
echo -n "Enter the 2nd string : "
read str2
cat_str="$str1$str2"
echo "cancatenated string : $cat_str"
OUTPUT:
sujin@sujin:~/work/shell$ bash str_concatenate.sh
Enter the 1st string : sujin
Enter the 2nd string : sr
cancatenated string : sujinsr
Enter the 1st string : sujin
Enter the 2nd string : sr
cancatenated string : sujinsr
No comments:
Post a Comment