Concatenating strings and using += in bash

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,568
Reaction score
1,285
Credits
11,462
Hi, everyone! Hope you're all having a nice life! :)

While checking my feed, I bumped into posts https://www.networkworld.com/article/3662068/concatenating-strings-and-using-in-bash.html#tk.rss_all and thought of sharing here.
An excerpt:
In general, the only time that you'd want to concatenate strings on Linux is when one string is already defined and you want to add more to it. For example, if you have a script that greets the person running it, you might set up a string in the script to prepare the greeting and then add the person's username or name before displaying it.
 

Members online


Latest posts

Top