How to concat variable and string in bash script
问题 How to concat variable and string in bash script ? val1 = Variable1 + "any string " eg : val1 = $i + "-i-*" where i = 24thMarch I want echo val1 : 24thMarch-i-* What is proper proper to get the solution ? 回答1: Strings are concatenated by default in the shell. value="$variable"text"$other_variable" It's generally considered good practice to wrap variable expansions in double quotes. You can also do this: value="${variable}text${other_variable}" The curly braces are useful when dealing with a