Reputation: 32316
The following code does not output "hello world" I do not want to use standard out unless I have to.
#!/bin/sh
message="hello "
message.="world"
echo $message
Upvotes: 0
Views: 879
Reputation: 156
the following works:
#!/bin/sh
message="hello "
message="$message world"
echo $message
Upvotes: 0
Reputation: 70497
You can use variable expansion to achieve this:
#!/bin/sh
message="hello "
message="${message}world"
echo $message
Upvotes: 4