Example 1: using +=
#!/bin/bash
website_name="Code2care"
website_name+=" - Lines of code for Change."
concatenated_str="$website_name$website_tag_line"
echo "$concatenated_str"
Output:

Example 2: using ${variable}
#!/bin/bash
website_name='Code2care'
website_tagline='Lines of code for Change.'
concatenated_str="${website_name} - ${website_tagline}"
echo "$concatenated_str"

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!