RosettaCodeData/Task/String-concatenation/UNIX-Shell/string-concatenation.sh
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

9 lines
259 B
Bash

s="hello"
echo "$s literal"
s1="$s literal" # This method only works with a space between the strings
echo $s1
# To concatenate without the space we need squiggly brackets:
genus='straw'
fruit=${genus}berry # This outputs the word strawberry
echo $fruit